[rabbitmq-discuss] about "exactly" policy on RabbitMQ 3.0.1
Simon MacMullen
simon at rabbitmq.com
Thu Feb 21 10:34:09 GMT 2013
On 21/02/13 07:58, t.otoda.freemail at gmail.com wrote:
> 1. How does RabbitMQ select nodes that queue is mirrored to in the cluster ?
>
> I want to know
> whether all mirrored Queue is mirrored to same 3 nodes,
> when there are more than 3 nodes in the cluster.
When the queue is first created, the nodes are selected randomly.
However, if you then take all the nodes in the cluster down and bring
them back up again, all queues will end up on the same three nodes -
because the queue will have come up on the first three nodes to be
available rather than waiting for the nodes it was originally on - since
there's no guarantee those nodes will ever come back up. I think this is
the best we can do without becoming a lot more complicated, having
queues migrate around the cluster for load balancing.
> 2. With the following cases,
> what does RabbitMQ set "exactly" policy do ?
>
> # As a premise,
> # I suppose ha-params to be 3.
>
> 1) 1 node ( named A) to which Queue is mirrored goes down
>
> I want to know
> whether RabbitMQ continue to publish messages to other 2 nodes
> (named B and C)
> without data lost.
Yes.
>
> 2) after 1), A is recovered
>
> I want to know
> whether Queue is mirrored to it again.
Yes.
> 3) instead of 2), another node ( named D ) is added in the cluster
>
> What should I do to allow Queue to be mirrored to D
> instead of A ?
It should be mirrored to D, you shouldn't need to do anything - assuming
there is an {exactly, 3} queue, and two nodes in the cluster, and a
third comes up, it should mirror to the new node regardless of whether
that node was in the cluster before.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware
More information about the rabbitmq-discuss
mailing list