[rabbitmq-discuss] Understanding Federation

Simon MacMullen simon at rabbitmq.com
Thu Feb 23 16:47:11 GMT 2012


On 23/02/12 16:36, MELIQUE Denis (MORPHO) wrote:
> Thank you Simon.
>
> This makes it much clearer for me.
> I was first surprised to see this queue always empty on my test bed,
> but the reason is (correct me if I'm wrong)
> that my system was not loaded enough, and consumers got messages as soon as they came in.

You're partly right. Your system was not loaded enough, but the messages 
in that queue will be consumed by the downstream exchange, not 
(directly) by your consumers.

> So every message consumed from the downstream is first written on disk.

No. The queue is durable, but that just determines whether it survives a 
restart. Transient messages can still through it, and remain transient.

Cheers, Simon

> This might be a disadvantage for performance.
> And gives an advantage to Shovel, as you can configure it with transient queues.
>
> Denis
>
> -----Original Message-----
> From: Simon MacMullen [mailto:simon at rabbitmq.com]
> Sent: Thursday, February 23, 2012 12:11 PM
> To: MELIQUE Denis (MORPHO)
> Cc: rabbitmq-discuss at lists.rabbitmq.com
> Subject: Re: [rabbitmq-discuss] Understanding Federation
>
> On 23/02/12 10:56, MELIQUE Denis (MORPHO) wrote:
>> I’m doing some testing with federation plug-in to try to understand it.
>
> Cool!
>
> <snip>
>
>> What are these Exchange and Queues used for ?
>
> The queue is there to buffer messages that are published to the upstream
> exchange and have not yet been consumed from the downstream exchange.
>
> It is bound to the internal exchange with the union of all the bindings
> that are in use downstream, so we only transfer messages that are going
> to be of use downstream.
>
> The internal exchange is there so that whenever we (re)establish a
> federation link we can set up an exact set of bindings
> mostly-atomically, by creating a new internal exchange, creating all the
> bindings to it, then binding it to the upstream exchange.
>
>> Are they reserved for federation internal use ?
>
> Yes.
>
>> When do messages go into these queues ?
>
> As mentioned, the bindings are pushed upstream so messages from upstream
> go into these queues if they will be routed once they get downstream.
>
>> Do they have to be durable or is there a way to configure them as
>> transient ?
>
> At the moment they have to be durable. Is this a problem? The idea is
> that you can set the queue TTL if you do not want them to hang around
> forever.
>
>> I would be very interested by a brief description of how federation
>> works internally.
>
> Hopefully this answers your question.
>
> Cheers, Simon
>


-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list