In Celery 3.1.18, the rpc backend does not allow the creation of a resultant queue for a single task.

I found the amqp backend in old Celery 3.0.24, it creates a result queue for each task, so after reading this: http://docs.celeryproject.org/en/master/whatsnew-3.1.html#new-rpc-result- backend I upgrade Celery to 3.1.18 as he said:

New RPC Result This new experimental version of the amqp backend is a good alternative to use in classic RPC scenarios, where the process that initiates the task is always the process to get the result.

It uses Kombu to send and receive results, and each client uses a unique response queue for sending. This avoids the significant overhead of the source backend of the amqp source file, which creates one queue for each task.

But this is not the case when I tested it, as shown below:

tasks.py celery = Celery('tasks', backend='rpc') @celery.task def mul(x, y): return x * y

test_tasks.py result = mul.delay(2, 3) print "mul.delay(x, y)={0}".format(result.get())

get started celery -A tasks worker -l info

Watch queues in rabbitmq sudo rabbitmqctl list_queues

Run test python test_tasks.py

Therefore, every time I run this test, I see how a new result queue is created. It’s just opposite the documents. And even more if I switch rpc to amqb as follows: celery = Celery('tasks', backend='amqp')

, , , Celery 3.1.18, , . , , docs amqp backend, rcp- .

+4

All Articles