[
https://issues.apache.org/jira/browse/QPID-3356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065213#comment-13065213
]
Gordon Sim commented on QPID-3356:
----------------------------------
The AMQP spec requires the exchange+queue+bindingkey triple to be unique,
however the headers exchange implementation does not enforce this. That is the
cause of the error message about duplicate management objects with the same
identifier - the binding is identified by that triple which should be unique.
That is also the cause of the duplicated message. Therefore there is a bug in
the basic headers exchange implementation itself where it needs to enforce this
uniqueness. (How it should do that is an interesting question - should it
reject or ignore attempts to bind with different args but the same
exchange+queue+biningkey?)
However there is also a bug in the handling of dynamic federation. For the
headers exchange the propagated bindings can't use the original binding key or
cases like above would either fail or one part of the subscription would be
lost.
> Dynamic Federation doesn't work as expected for headers exchange
> ----------------------------------------------------------------
>
> Key: QPID-3356
> URL: https://issues.apache.org/jira/browse/QPID-3356
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Affects Versions: 0.13
> Reporter: Gordon Sim
>
> start two brokers, link amq.match using a dynamic route in one direction,
> start two subscribers on the destination broker (e.g two drain instances from
> amq.match; {link:{x-bindings:[{arguments:{source:B, x-match:any}}]}} and
> amq.match; {link:{x-bindings:[{arguments:{format:standard, x-match:any}}]}}
> respectively), you then see the following error appear on the source broker
> after a second or so:
> error Detected two management objects with the same identifier:
> 0-614-1--18(org.apache.qpid.broker:binding:org.apache.qpid.broker:exchange:amq.match,org.apache.qpid.broker:queue:bridge_queue_1_a51ddbb5-bac4-4e6a-ba45-3a2e1b096858,)
> Further, duplicate messages can then be received at the subscribers. E.g.
> send a message to the source broker that matches each subscriber and observe
> that the message is received twice by each of them (e.g. spout --content
> my-message -P format=standard -P source=B amq.match)
> This appears to be due to the same binding key being used for two different
> subscriptions. E.g. if you changes the addresses for the drains above to:
> amq.match; {link:{x-bindings:[{key: key1, arguments:{source:B,
> x-match:any}}]}} and amq.match; {link:{x-bindings:[{key: key2,
> arguments:{format:standard, x-match:any}}]}} respectively, i.e. add unique
> keys to each, then you avoid the error and the message duplication.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]