[rabbitmq-discuss] Envelop redeliver question ( clustering ha redelivery question)

Emile Joubert emile at rabbitmq.com
Mon Jul 9 14:15:32 BST 2012


Hi,

On 09/07/12 12:58, Vikas wrote:
> Thanks for your reply . I've set QoS prefetch count set to one.
> 
> The problem is observed in only one scenario 
> 
> Node1 and Node2 are running in cluster ha
> Stop Node2
> Start Node2
> Restart Consumer
> All old messages are received with redeliver as true .

How are you stopping the node? It is not clear from your last email
whether nodes are being shutdown cleanly or forcibly. Disregarding HA
for the moment, if the broker is stopped forcibly then all recovered
queues will have their contents set to redelivered. The information
about which messages were delivered is held in RAM, so when the broker
starts up after crashing it must assume that all messages could have
been delivered, hence a redelivered flag on all messages.

The situation with HA is different, because another node can take over
the master role. But if the last node is shut down uncleanly then you
can also observe all messages being marked redelivered after the node
starts up and the queue is recovered.

In the scenario you describe, I would expect Node1 to be the master for
all queues when Node2 stops, and any unacknowledged messages held by the
consumer when it disconnects to be have the redelivered flag set. Does
that match up with what you are seeing? I'm not sure what you mean by
"old messages" - does this refer to messages that have not been
delivered before?


-Emile




More information about the rabbitmq-discuss mailing list