You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Robert Godfrey <ro...@gmail.com> on 2010/01/04 17:45:27 UTC

Federation Implementation Questions

As alluded to in my earlier mail, I spent a bit of time over the last couple
of weeks implementing federation in the Java Broker...

Trying to derive how it worked through playing with the C++ broker I did the
following

Set up three brokers A, B and C

Created an exchange on each of them called "myexchange", and set up two
dynamic links (one in each direction) between every pair of brokers

I then had a client create a queue on B and bind it to myexchange with the
binding key "mykey",

Now if I published a message to myexchange with routing-key "mykey" it
arrived at the client at B twice (one going direct from A to B, and once
going to from A to B via C).

Further when I then added a second client connected to C, creating a queue
on that broker and also binding it to myexchange with binding-key mykey...
And then delete consumer on B ... the federated bindings necessary to get
the messages to C are also deleted.

Are these behaviours expected?

-- Rob

Re: Federation Implementation Questions

Posted by Gordon Sim <gs...@redhat.com>.
On 01/04/2010 04:45 PM, Robert Godfrey wrote:
> As alluded to in my earlier mail, I spent a bit of time over the last couple
> of weeks implementing federation in the Java Broker...
>
> Trying to derive how it worked through playing with the C++ broker I did the
> following
>
> Set up three brokers A, B and C
>
> Created an exchange on each of them called "myexchange", and set up two
> dynamic links (one in each direction) between every pair of brokers
>
> I then had a client create a queue on B and bind it to myexchange with the
> binding key "mykey",
>
> Now if I published a message to myexchange with routing-key "mykey" it
> arrived at the client at B twice (one going direct from A to B, and once
> going to from A to B via C).

Ted is probably the best person to comment on the above, but its quite 
possibly 'expected' at present. We may of course want to address that.

> Further when I then added a second client connected to C, creating a queue
> on that broker and also binding it to myexchange with binding-key mykey...
> And then delete consumer on B ... the federated bindings necessary to get
> the messages to C are also deleted.

This is certainly a bug. It may simply be that the design relies on a 
federated binding for each local binding but where the key is identical 
the second binding doesn't actually result in a duplicate federated binding.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org