[rabbitmq-discuss] Federation setup query
Simon MacMullen
simon at rabbitmq.com
Mon Aug 5 17:52:12 BST 2013
On 05/08/13 15:24, Jain, Punit wrote:
> I want to setup federation b/w two brokers called A (Downstream) and B
> (Upstream). We have redundant network link between these two brokers. B
> has two IPs, named IP1 and IP2. I have setup federation in following way
<snip>
> I have tested this setup and it is working fine. I have few questions
> regarding this setup:
>
> ·Is it wise to create a single upstream with two uris? Or the above
> setup is good and will provide network high availability incase if a
> network link goes down?
I would create a single upstream with two URIs. Both configurations will
provide network high availability, but if you have two upstreams you can
see messages being reordered.
> ·Though we have specified two upstream, but when we list exchanges and
> queues on broker B it shows only one x-federation-upstream and a single
> upstream queue
These objects are identified in the upstream broker by the name of the
downstream broker - therefore if you have a single downstream connecting
more than once you will have multiple federation links sharing the same
queue / exchange. This is not how it's designed to work.
> and there is no duplication of messages. This is the
> exact behavior we expect, but I want to understand that how does
> RabbitMQ achieve this behavior and avoid duplication. It would be a
> great help if you can point me to some documentation or a link.
There won't be duplication since there's only one upstream queue.
However since you have two links consuming from it and publishing to the
same exchange, messages can overtake each other and become reordered.
Also the links will consider themselves to each own the
x-federation-upstream exchange and the upstream queue; they may tread on
each others toes here. So...
> Any suggestion or advice to improve this configuration.
...you shouldn't point two upstreams to the same cluster.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, Pivotal
More information about the rabbitmq-discuss
mailing list