celeryev Queue in RabbitMQ Becomes Very Large

speedplane picture speedplane · Jul 22, 2013 · Viewed 8.7k times · Source

I am using celery on rabbitmq. I have been sending thousands of messages to the queue and they are being processed successfully and everything is working just fine. However, the number of messages in several rabbitmq queues are growing quite large (hundreds of thousands of items in the queue). The queues are named celeryev.[...] (see screenshot below). Is this appropriate behavior? What is the purpose of these queues and shouldn't they be regularly purged? Is there a way to purge them more regularly, I think they are taking up quite a bit of disk space.

screenshot of rabbitmq control

Answer

Balthazar Rouberol picture Balthazar Rouberol · Nov 25, 2014

You can use the CELERY_EVENT_QUEUE_TTL celery option (only working with amqp), that will set the message expiry time, after which it will be deleted from the queue.