[rabbitmq-discuss] Modifying requeued Message header
emile at rabbitmq.com
Mon Sep 24 10:35:08 BST 2012
On 23/09/12 09:03, sharma wrote:
> Or is there another way to do this , apart from changing message header.
You cannot make arbitrary changes to a message header after publishing,
but you can emulate the effect of this by consuming and republishing a
copy of the message with different headers.
If you have a workflow with 3 steps then one option is to set up a
pipeline with 3 queues where each processor receives the message and
publishes it on to the next step.
As an aside, you can detect whether a message has been previously
delivered and requeued by inspecting the "redelivered" flag:
This is a boolean field, so you can't use this to distinguish between
different numbers of redeliveries greater than one.
Another possibly relevant feature is that dead-lettered message retain a
record of time and reason (among other fields) each time that
dead-lettering takes place. See the documentation at
More information about the rabbitmq-discuss