[rabbitmq-discuss] Are queues replicated across a cluster?

Bill Moseley moseley at hank.org
Thu Jan 13 14:42:19 GMT 2011

http://www.rabbitmq.com/clustering.html says:

All data/state required for the operation of a RabbitMQ broker is replicated
> across all nodes, for reliability and scaling, with full ACID properties. An
> exception to this are message queues, which currently only reside on the
> node that created them, though they are visible and reachable from all
> nodes. Future releases of RabbitMQ will introduce migration and replication
> of message queues.

I don't understand that sentence that says the queues only reside on the
node that created them -- but they are visible on both.  Is that talking
about replicating *messages* or queues?  Queues and messages are separate
things.  I understand that messages are not duplicated/replicated in the

I have two nodes in a cluster node1 and node2 (on same server, different
ports).  I declare an exchange, queue, and binding on node1 only.  Next, I
start consumers on node1 and node2 -- these do not declare the queue, they
only consume.  This succeeds so therefore the queue is accessible from both
node1 and node2.

Next I connect to node1 and send two messages to the queue.  One message
ends up with the consumer on node1 and the consumer on node2 receives the
other message.

What's the distinction between "residing" and "visible"?  Does it mean the
messages are only stored on node1 until consumed (by either node)?  But, I
can declare the same queue on both nodes and see the same behavior.  Can
someone please clear this up for me?

What I have failed to find when reading about clustering is how to connect
to the nodes in a cluster.  If I have node1 and node2 in my cluster and 10
producers (say web servers) and 4 worker machines do I configure 5 producers
to connect to node1 and 5 to node2, and then likewise split the consumer
connections across the two nodes?

To be clear, this is not HA.  So, if node1 fails then 1/2 the producers and
1/2 the consumers can no longer function.  Correct?

Or is the typical approach to use something like HAProxy in front of node1
and node2 and have all consumers and producers connect to HAProxy?  (That
ends up as a single point of failure.)

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110113/c118e4f0/attachment-0001.htm>

More information about the rabbitmq-discuss mailing list