It is important to highlight that a RabbitMQ message is immutable. This means none of the message, including the header, properties, and body, can be altered by an application unless republished as a new message. This makes it infeasible to maintain a “retry counter” with the message itself to indicate how many times the message has been retried. If there are competing consumers then the same message can be picked up by any consumer, which could be running on a separate thread or process or altogether on a different platform. This adds additional complexity to maintaining a “retry counter” on the consumer application side.

#database #rabbitmq

RabbitMQ Consumer Retry Mechanism Tutorial
1.45 GEEK