I noticed that celery sends jobs to several queues, and workers in both queues complete tasks.
My definitions are in the queue:
CELERY_QUEUES = ( Queue('default', Exchange('default'), routing_key='default'), Queue('client1', Exchange('client1'), routing_key='client1'), Queue('images', Exchange('media'), routing_key='media.images'), )
And when, after stopping all my workers, I run:
>>> tasks.ping.apply_async(queue='default')
I see that the task is displayed in the default and client1 queues:
$ redis-cli -c llen default (integer) 1 $ redis-cli -c llen client1 (integer) 1
This applies only to the default queue. Sending it directly to client1 queue only adds there:
>>> tasks.ping.apply_async(queue='client1') $ redis-cli -c llen default (integer) 1 $ redis-cli -c llen client1 (integer) 2
The images queue never accepts tasks incorrectly.
This is celery 3.1.15 with the Redis broker.
source share