Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ Delivery Acknowledgement Timeout

I am using a managed RabbitMQ cluster through AWS Amazon-MQ. If the consumers finish their work quickly then everything is working fine. However, depending on few scenarios few consumers are taking more than 30 mins to complete the processing. In that scenarios, RabbitMQ deletes the consumer and makes the same messages visible again in the queue. Becasue of this another consumer picks it up and starts processing. It is happing in the loop. Therefore the same transaction is getting executed again and I am loosing the consumer as well. I am not using any AcknowledgeMode so I believe it's AUTO by default and it has 30 mins limit. Is there any way to increase the Delivery Acknowledgement Timeout for AUTO mode? Or please let me know if anyone has any other solutions for this.

like image 914
Swagat Avatar asked Oct 27 '25 14:10

Swagat


2 Answers

Reply From AWS Support:

Consumer timeout is now configurable but can be done only by the service team. The change will be permanent irrespective of any version.

So you may update RabbitMQ to latest, and no need to stick with 3.8.11. Provide your broker details and desired timeout, they should be able to do it for you.

like image 186
Abhishek Avatar answered Oct 30 '25 06:10

Abhishek


You're right that this is happening because of the delivery acknowledgement timeout. A default value of 30 minutes was introduced in RabbitMQ version 3.8.15.

You can set the consumer_timeout value through configuration in Amazon MQ. https://aws.amazon.com/about-aws/whats-new/2023/07/amazon-mq-managed-configuration-rabbitmq-brokers/

Here's a guide for how to apply configuration to your Amazon MQ broker. https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/rmq-configuration.html

Starting in RabbitMQ version 3.12 you can set the delivery acknowledgement timeout with a policy. https://www.rabbitmq.com/consumers.html#acknowledgement-timeout

like image 43
Stefan Moser Avatar answered Oct 30 '25 07:10

Stefan Moser



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!