[rabbitmq-discuss] Temporary queue being made when task fails

Ask Solem ask at rabbitmq.com
Mon Aug 22 14:08:03 BST 2011


On 22 Aug 2011, at 08:14, SiddharthSaha wrote:

> I am using Celery with RabbitMQ. Lately, I have noticed that a large
> number of temporary queues are getting made.
> 
> So, I experimented and found that when a task fails (that is a tasks
> raises an Exception), then a temporary queue with a random name (like
> c76861943b0a4f3aaa6a99a6db06952c) is formed and the queue remains.
> 
> Some properties of the temporary queue as found in rabbitmqadmin are
> as follows -
> 
> auto_delete : True consumers : 0 durable : False messages : 1
> messages_ready : 1
> 
> And one such temporary queue is made everytime a task fails (that is,
> raises an Exception). How to avoid this situation? Because in my
> production environment a large number of such queues get formed.
> 
> I do not want this temporary queue to be made. When a task fails, I
> want that the task is tried one more time and even though it fails,
> the temporary queue should not be made.
> 
> How can I do that?

Please see

  http://docs.celeryproject.org/en/latest/userguide/tasks.html#task-states

If you want to disable states completely, set

  CELERY_RESULT_BACKEND = "disabled"

If you want to automatically expire uncollected states, set
http://docs.celeryproject.org/en/latest/configuration.html#celery-amqp-task-result-expires

Results are disabled by default in 2.3,
see changelog: http://docs.celeryproject.org/en/latest/changelog.html#important-notes


> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list