[rabbitmq-discuss] Federation with Clusters and Load Balancers

James Carr james.r.carr at gmail.com
Mon Mar 19 14:43:55 GMT 2012


Hi,

So one problem I had while testing out federation across clusters with
is the upstream node eventually gets queues created for each
downstream node in the downstream cluster. For example from randomly
restarting downstream brokers I wind up with the following queues on
the upstream box:

federation: usage -> rabbit at dc2rabbitmq3
federation: usage -> rabbit at dc2rabbitmq4
federation: usage -> rabbit at dc2rabbitmq5
federation: usage -> rabbit at dc2rabbitmq6

This would seem to be okay but unfortunately when the downstream
cluster reconnects to the upstream, only one of the nodes (say 6 will
connect and empty its queue. 3, 4, and 5 will just sit there with
messages in them and will only get empty if one of those nodes happen
to reconnect when node 6 disconnects.

Is there a good solution to this? it seems like it might work if there
was someway for each of the 4 nodes to just use the same queue on the
upstream broker since they are logically part of the same group.

Thanks,
James


On Thu, Mar 15, 2012 at 5:59 AM, Simon MacMullen <simon at rabbitmq.com> wrote:
> On 14/03/12 20:34, James Carr wrote:
>>
>> I've been wondering what the "right" setup is to federate between
>> clusters. Do I just setup each node in the cluster to federate with
>> the upstream through the load balancer? My fear here is I'll end up
>> with with all the nodes on one cluster connected to a single node
>> (through the load balancer) and hence 3 sepeare queues causing
>> messages to be duplicated three times! :)
>
>
> You need to make sure that all nodes in the cluster have the federation
> plugin enabled, and have the same configuration. The federation plugin will
> then make sure that only one node establishes a link to the upstream (which
> will fail over to another node if that node goes down).
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list