Sometimes we have to run background tasks with a quite long duration time. However, the RabbitMQ has a default time limitation for waiting the ack. If the execution time is exceed, you will got an error message like “Delivery acknowledgement timeouts” and your channel will be broken.
To cancel this time rule, you need edit the config file located in /etc/rabbitmq/advanced.config , and add the following line. (If this file dose not exist, you need create an empty config file at first)
1 |
[ {rabbit, [ {consumer_timeout, undefined} ]} ]. |
Next step, you need restart the RabbitMQ node and execute the following command to make sure the config is applied successfully.
1 |
rabbitmq-diagnostics environment|grep consumer_timeout |