RabbitMQ message redelivery: separate transient retries from poison messages
RabbitMQ can requeue an unacknowledged delivery when a consumer channel or connection closes before manual ACK. If every failure immediately requeues the message, it can form a hot loop that pressures workers and the broker. Classify failures and use delayed, bounded retries for transient errors and a dead-letter path for permanent errors.
RabbitMQ can requeue an unacknowledged delivery when a consumer channel or connection closes before manual ACK. If every failure immediately requeues the message, it can form a hot loop that pressures workers and the broker. Classify failures and use delayed, bounded retries for transient errors and a dead-letter path for permanent errors.
In AMQP 0-9-1, consumer ACK tells RabbitMQ that a delivery was processed. A connection loss before ACK can lead to redelivery. The application can also reject a message with basic.nack or basic.reject. With requeue=true, it becomes eligible for delivery again; with requeue=false, it can be dead-lettered when a DLX is configured. ACK does not roll back business changes, so duplicate side effects need application idempotency. A RabbitMQ delivery tag is scoped to its channel; it is not an application event ID, and ACK/NACK must use the receiving channel.