[rabbitmq-discuss] Rabbitmq persistence on federation

Simon MacMullen simon at rabbitmq.com
Wed Jan 11 11:57:16 GMT 2012

On 11/01/12 11:47, Dhivya Swaminathan wrote:
> Hi,


> I am new to federation plugin in rabbitmq.From the federation plugin
> release preview it is told--"Queues that bind to a federation exchange
> receive messages that were published to the upstream exchanges (or the
> upstreams' upstreams) as well as messages that are published locally. In
> the event of the network going down, messages will be queued upstream."
> My understanding
> Upstream exchanges-a set of exchanges each in a remote broker connected
> through WAN to a federated exchange.
> Federation exchange- a local broker which connects with Upstream
> brokers.


> Also it contains all the collection of published messages all
> over remote m/c and the local m/c.

No. Federated exchanges (like all AMQP exchanges) do not really 
"contain" any messages.

> If so,if we pass a message from the local broker to a remote broker and
> the connection goes down at that time,persistence of messages will be
> there in local node or in remote node or duplication will occur on both
> nodes.

Well, you've just swapped the definition of "local" and "remote" you 
were using before. Obviously every broker is local to somewhere, which 
is why we use the terms "upstream" and "downstream" instead :-)

A federated exchange will pull in messages from its upstreams (and so we 
would refer to it as the downstream). The messages published to the 
upstream exchange are queued in the upstream broker waiting for the 
downstream exchange to get them. So in the event of the connection going 
down, that's where they'll be.

Note that some messages may be in flight at this point - if so they can 
be duplicated.

> How is mnesia working in Rabbitmq-Federation.

It's not, really. It contains the definitions of the federated exchanges 
(as it does for all the exchanges).

> Also what are the
> downstream exchnages?Is that the local exchange of the local broker?

As mentioned, "local" can be confusing. But when you declare a federated 
exchange, that is the downstream. Does that make sense?

Cheers, Simon

Simon MacMullen
RabbitMQ, VMware

More information about the rabbitmq-discuss mailing list