[rabbitmq-discuss] Can load-balancer work around consumer reconnect problem?

Tim Watson tim at rabbitmq.com
Thu Mar 28 15:32:52 GMT 2013


Hi,

On 28 Mar 2013, at 07:38, Jianhui Zhang wrote:
> I'm new to Rabbit, just want to confirm if my understanding of mirror-queues is correct. 
[snip]
> - under no failure condition, the master Node1 will send messages to all my consumers. 
> - if master fails, the slave Node2 will be promoted to the new master and start sending the remaining messages to my consumers. 

That's not quite right. If there is a failover to another node, then the surviving node will bounce any existing consumers (i.e., assume they've all gone away) and they will need to reconnect.

> - since the consumer TCP connection is to the LB, the consumer wouldn't notice anything (and don't need to reconnect), except for the "normal" out-of-sync and message loss considerations. 
> 
> Would this work? 

Not AFAIK, because of the above points. Your consumers can register for a 'consumer cancel notification' to be informed of this however, and then re-establish themselves if it happens. See http://www.rabbitmq.com/consumer-cancel.html for details.

Cheers,
Tim

> 
> Thanks, 
> James
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list