[rabbitmq-discuss] Disk node vs ram node

Dave Greggory davegreggory at yahoo.com
Wed Aug 11 14:17:40 BST 2010


I'm a little concerned regarding what happens when a node that contains a certain queue in a cluster goes down. 

On Aug 5, 2010, at 5:38 PM, Alexandru Scvortov <alexandru at rabbitmq.com> wrote:

> If you declare a queue Q1 on node A with queue.declare, then Q1 will
> reside on node A.  If node A goes down, all the messages on its queues
> (including Q1) will become inaccessible.  If Q1 was declared as durable,
> then the messages published as persistent on it will become available
> when node A comes back online.
> 
> In a cluster, when a node goes down, its queues become inaccesbile.
> They are *not* automatically created on other nodes.

I'm using the java client (1.8.1) and I automatically reconnect my producers/consumers to another node when a node goes down. I do this by    setting up a shutdown listener hook on the connection.

When a node with a queue goes down, can I write something using the java client that re-declares all known queues on the other node. May be have all the queue names(and params) registered somewhere in the app and upon reconnect, passively re-declare them. If passive declaration throws an exception, catch that and do an actual declaration. Would that work?

If that works, then what happens if we bring up the node that went down that had the queue originally? Would it play nice?

I'd like to find a solution without resorting to using the pacemaker approach.

This is important not just for node failures but for other things as upgrading or reconfiguring rabbit without affecting any clients. (our rabbits sit behind a round-robin load balancer). 


More information about the rabbitmq-discuss mailing list