celery-amqp-backend is a rewrite of the Celery's original amqp:// result backend, which was removed from Celery
with version 5.0. Celery encourages you to use the newer rpc:// result backend, as it does not create a new
result queue for each task and thus is faster in many circumstances. However, it's not always possible to switch
to the new rpc:// result backend, as it does have restrictions as follows:
rpc://does not support chords.rpc://results may hold a wrong state.rpc://may lose results when usinggeventorgreenlet.
The result backend celery_amqp_backend.AMQPBackend:// does not suffer from the same issues.
With a correctly configured pipenv toolchain:
pipenv install celery-amqp-backendYou may also use classic pip to install the package:
pip install celery-amqp-backendSet to 'celery_amqp_backend.AMQPBackend://' to use this result backend.
Default: False
If set to True, result queues will be persistent queues. This means that messages will not be lost after a
message broker restart.
Default: 'celery_result'
The prefix for result queues created by the backend (e.g. if result_exchange is set to 'example', a result
queue may be named 'example.36723ac0-aacf-4668-8927-08794d0b082e').
Default: 'direct'
The type of the exchange created by the backend (e.g. 'direct', 'topic' etc.).
result_backend = 'celery_amqp_backend.AMQPBackend://'
result_persistent = False
result_exchange = 'celery_result'
result_exchange_type = 'direct'| Celery 5.2 | Celery 5.3 | Celery 5.4 | |
|---|---|---|---|
| Python 3.9 | ✓ | ✓ | ✓ |
| Python 3.10 | ✓ | ✓ | ✓ |
| Python 3.11 | ✓ | ✓ | ✓ |
| Python 3.12 | ✗ | ✓ | ✓ |
| Python 3.13 | ✗ | ✗ | ✗ |
- Andreas Stocker AStocker@anexia-it.com, Lead Developer