@@ -5,16 +5,26 @@ celery-amqp-backend
55[ ![ Test Status] ( https://github.com/anexia/celery-amqp-backend/actions/workflows/test.yml/badge.svg?branch=main )] ( https://github.com/anexia/celery-amqp-backend/actions/workflows/test.yml )
66[ ![ Codecov] ( https://codecov.io/gh/anexia/celery-amqp-backend/branch/main/graph/badge.svg )] ( https://codecov.io/gh/anexia/celery-amqp-backend )
77
8- ` celery-amqp-backend ` is a rewrite of the Celery's original ` amqp:// ` result backend, which was removed from Celery
9- with version 5.0. Celery encourages you to use the newer ` rpc:// ` result backend, as it does not create a new
10- result queue for each task and thus is faster in many circumstances. However, it's not always possible to switch
11- to the new ` rpc:// ` result backend, as it does have restrictions as follows:
8+ ` celery-amqp-backend ` contains two result backens for Celery.
9+
10+ # ` AMQPBackend ` result backend
11+
12+ The ` AMQPBackend ` result backend is a rewrite of the Celery's original ` amqp:// ` result backend, which was removed from
13+ Celery with version 5.0. Celery encourages you to use the newer ` rpc:// ` result backend, as it does not create a new
14+ result queue for each task and thus is faster in many circumstances. However, it's not always possible to switch to the
15+ new ` rpc:// ` result backend, as it does have restrictions as follows:
1216 - ` rpc:// ` does not support chords.
1317 - ` rpc:// ` results may hold a wrong state.
1418 - ` rpc:// ` may lose results when using ` gevent ` or ` greenlet ` .
1519
1620The result backend ` celery_amqp_backend.AMQPBackend:// ` does not suffer from the same issues.
1721
22+ # ` DirectReplyAMQPBackend ` result backend
23+
24+ The ` DirectReplyAMQPBackend ` result backend makes use of RabbitMQ's direct-reply feature. It is much faster than the
25+ traditional ` AMQPBackend ` result backend and should even beat Celery's built-in ` rpc:// ` result backend. However,
26+ contrary to the ` AMQPBackend ` result backend it does not support chords.
27+
1828# Installation
1929
2030With a [ correctly configured] ( https://pipenv.pypa.io/en/latest/basics/#basic-usage-of-pipenv ) ` pipenv ` toolchain:
@@ -29,7 +39,7 @@ You may also use classic `pip` to install the package:
2939pip install celery-amqp-backend
3040```
3141
32- # Getting started
42+ # Getting started with ` AMQPBackend `
3343
3444## Configuration options
3545
@@ -57,6 +67,19 @@ Default: `'direct'`
5767
5868The type of the exchange created by the backend (e.g. ` 'direct' ` , ` 'topic' ` etc.).
5969
70+ # Getting started with ` DirectReplyAMQPBackend `
71+
72+ ## Important notes
73+
74+ * You must set the ` reply_to ` property of Celery tasks to ` "amq.rabbitmq.reply-to" ` .
75+ * The ` DirectReplyAMQPBackend ` does not support chords.
76+
77+ ## Configuration options
78+
79+ ### ` result_backend: str `
80+
81+ Set to ` 'celery_amqp_backend.DirectReplyAMQPBackend://' ` to use this result backend.
82+
6083## Example configuration
6184
6285``` python
0 commit comments