2 years ago

#72194

test-img

jpsca1293

Setting RabbitMQ additional configs via celery

I have been reading about Delivery Acknowledgement Timeout in RabbitMQ and how this is controlled by an additional configuration in rabbitmq via the consumer_timeout variable. When using Redis as broker for celery, you can easily set visibility_timeout in the celery broker transport options configuration. For example

celery_app = Celery("my_app")
celery_app.conf.broker_transport_options = {"visibility_timeout": 3600}

So far I could not find any documentation on how to do the same for setting consumer_timeout for RabbitMQ. I could only find how to set it up in the rabbitmq.config file - which I do not have access - so I was wondering if it is possible to add this configuration via celery.

I have tried (* 1000 because it is in ms) but I do not think it is working.

celery_app.conf.broker_transport_options = {"consumer_timeout": 3600 * 1000}

I am using Celery > 5 and rabbitmq 3.9.

python

rabbitmq

celery

0 Answers

Your Answer

Accepted video resources