Is it OK to hold back ack for a long time in RabbitMQ?

Viewed 631

Is it OK for a consumer (in manual ack mode) to hold back the ack message for a long time?

The use case is that a process (the consumer) processes messages from a queue (ack is set to manual), the processing takes a long time (several minutes to hours), after the processing is done, an ack is sent back.

Is RabbitMQ server/client designed to handle this kind of usage pattern?

1 Answers

This design can be done, but is not strongly recommended. Starting in RabbitMQ 3.8.15, there is a new feature that will close connections if a message is unacknowledged longer than the configuration. So you will want to ensure that the configuration is set for a duration greater than what your clients will experience. See consumer_timeout documentation.

Related