how to increase Delivery acknowledgment timeouts rabbitMQ version is 3.10.1
rabbitMQ configuration
rabbitmq:
hostname: 'prod-rabbitmq'
image: "rabbitmq:3.10.1-management-alpine"
container_name: puppeteer-script-rabbitmq
restart: always
volumes:
- ./data/rabbitmq:/var/lib/rabbitmq
- ./data/rabbitmq:/var/log/rabbitmq
- ./data/rabbitmq:/var/lib/rabbitmq/mnesia
ports:
- "5672:5672"
- "15672:15672"
operation none caused a channel exception precondition_failed: delivery acknowledgment on channel 1 timed out. Timeout value used: 1800000 ms. This timeout value can be configured, see the consumers doc guide to learn more
2
Answers
This feature was implemented in RabbitMQ version 3.8.14 or thereabouts. The default setting is 1800000 ms (30 min).
When this timeout is reached, RabbitMQ closes the consumer channel and returns the message to the source queue. It will be redelivered to consumers repeatedly until it is acknowledged.
You can read more about how to change the RabbitMQ configuration and consumer_timeout here:
https://www.rabbitmq.com/consumers.html#acknowledgement-timeout
you can set the delivery acknowledge using
rabbitmq.conf
file. This is not created by itself. For ubuntu it’s locating inside/etc/rabbitmq/
, inside this file set theconsumer_timeout=5000
. I have set it 5 seconds. You can choose any value and then restart therabbitmq
node. It will work.