Problem Analysis
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.
Resolution
With RabbitMQ server version 3.8.X onwards, an additional parameter named x-death has been introduced. This parameter can be leveraged to manage the retry mechanism.
from DZone.com Feed https://ift.tt/2JEL37l
No comments:
Post a Comment