7👍
x-message-ttl is in milliseconds – NOT SECONDS.
You want to put something like this in your celery config file:
from kombu import Exchange, Queue
CELERY_QUEUES = [
Queue(
'celery',
Exchange('celery'),
routing_key = 'celery',
queue_arguments = {
'x-message-ttl': 30000
}
)
]
2👍
The option CELERY_EVENT_QUEUE_TTL= 30 is only for Events and not for Tasks as the name states. Celery will keep a message for a task as long as necessary, which makes sense.
In my case I used RabbitMQ Federation which doubled the queue. Switching to Shovel solved the issue for me.
- [Django]-Django cluster deployment
- [Django]-Django – Adding {% url %} in template with slug
- [Django]-Adding a **kwarg to a class
Source:stackexchange.com