rabbitmq - In Celery 3.1.18, rpc backend fail to avoid creating resulting queue per task -


i found amqp backend in old celery 3.0.24, creates resulting queue per task, after reading this: http://docs.celeryproject.org/en/master/whatsnew-3.1.html#new-rpc-result-backend upgrade celery 3.1.18, it's said:

new rpc result backend new experimental version of amqp result backend alternative use in classical rpc scenarios, process initiates task process retrieve result.

it uses kombu send , retrieve results, , each client uses unique queue replies sent to. avoids significant overhead of original amqp result backend creates 1 queue per task.

but not case when tested 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())

start worker celery -a tasks worker -l info

observe queues in rabbitmq sudo rabbitmqctl list_queues

run test python test_tasks.py

so every time run test, see new resulting queue created. it's opposite docs. , further more if switch rpc amqb this: celery = celery('tasks', backend='amqp')

and try test once again, see resulting queue created, it's auto deleted in celery 3.1.18, that's want. curious why behavior not docs said , amqp backend works while rcp backend not work.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -