On 02/10/2014 23:20, AG wrote:
> I have a cluster that replicates all Queues on all Nodes. While I didn't
> have explicit params for cluster config, the queues are replicated on
> all nodes as I can be seen from ADMIN
Are you saying you did not set up a mirroring policy but all queues can
be seen from the management plugin on all nodes? That means the queues
are unmirrored. Queues will always be visible to all nodes, mirrored or not.
> a) How can it be confirmed if Queues are in indeed in mirrored mode
> (Either by looking at ADMIN or some other way)
In the web UI, you should see "<master node> +1" (or +2, +3 etc) in the
Node column. The +N part tells you how many slaves the queue has.
Alternately, "rabbitmqctl list_queues name pid slave_pids" will show the
master node and slave nodes from the command line.
> b) I had single Publisher and Consumer to a single Queue on this cluster
> and message activity can be seen on both NODES in cluster in ADMIN WEB
> Page. Does the consumer connect to a always the master node?
From the consumer's point of view it connects to whichever cluster node
you told it to via AMQP. If that's not the node which contains the
queue, messages are then routed across the cluster to the consumer. This
is transparent but can have a performance cost.
> c) Does the Publisher connect to Master or BOTH nodes?
Again, the publisher connects to whichever node you tell it to. Messages
are then routed from that node to all nodes containing the queue.
See
http://www.rabbitmq.com/ha.html#behaviour for more details.
Cheers, Simon