Home:ALL Converter>Celery restart causes redelivery of scheduled tasks in RabbitMQ

Celery restart causes redelivery of scheduled tasks in RabbitMQ

Ask Time:2019-03-06T18:11:28         Author:Sudhanshu Mishra

Json Formatter

I have a celery worker which consumes tasks from a RabbitMQ broker. This works great until a restart of the worker. celery multi restart -A proj causes all the scheduled(Unacked) messages to become ready again which then immediately starts getting redelivered causing a delay in consumption of new incoming tasks depending on the number of the scheduled tasks.

The speed of redelivery depends on the concurrency of the workers.

enter image description here

Is there a way to avoid this behavior?

Author:Sudhanshu Mishra,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/55020510/celery-restart-causes-redelivery-of-scheduled-tasks-in-rabbitmq
yy