Backend Capabilities¶
This page summarizes practical capability expectations across built-in backends.
Shared Contract¶
All built-in backends implement BaseBackend methods used by:
- enqueue/dequeue/ack
- delayed jobs
- retries/DLQ support
- queue pause/resume
- dependency resolution
- worker registry and stalled-job support methods
Important Differences¶
InMemoryBackend:
- no durable storage across process restarts
- lock implementation is in-process only
RedisBackend:
- default production-oriented backend
- distributed lock via Redis lock primitives
PostgresBackend:
- SQL persistence and advisory-lock-based lock helper
- requires schema bootstrap
MongoDBBackend:
- document persistence
- lock helper is in-process (
anyio.Lock), not distributed
RabbitMQBackend:
- broker delivery handled by RabbitMQ
- metadata/state persistence delegated to a job store (Redis-backed by default)
Choosing by Requirement¶
- Need simplest durable queue backend: Redis.
- Need SQL-native persistence: Postgres.
- Need Mongo-native persistence: MongoDB.
- Need AMQP broker integration: RabbitMQ.
- Need lightweight local tests: InMemory.