[rabbitmq-discuss] Federation setup query
Jain, Punit
Punit.Jain at emc.com
Fri Sep 20 13:26:25 BST 2013
Hi,
We are using federation setup with two URIs defined in an upstream, as suggested by you. I simulated link failure by closing one of the Ethernet port. I observed that it takes around 15-20 minutes to switch link. Why is it taking this much time? Is there a way I can decrease the switch time?
One more question: on the same setup, I stopped RabbitMQ server on downstream and started it after few seconds. Sometimes the messages published to upstream exchange during that duration are lost. Though, they were present in the upstream queue during that period, but lost after the downstream broker was started.
Thanks,
Punit
> -----Original Message-----
> From: Jain, Punit
> Sent: Monday, August 05, 2013 10:45 PM
> To: 'Simon MacMullen'; Discussions about RabbitMQ
> Subject: RE: [rabbitmq-discuss] Federation setup query
>
> Thanks a lot Simon for detailed explanation, this answers my questions
> precisely.
>
> -----Original Message-----
> From: Simon MacMullen [mailto:simon at rabbitmq.com]
> Sent: Monday, August 05, 2013 10:22 PM
> To: Discussions about RabbitMQ
> Cc: Jain, Punit
> Subject: Re: [rabbitmq-discuss] Federation setup query
>
> 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