Description of problem: When the alternate exchange is defined in the link properties, the alternate exchange setting is not applied, regardless if defined for queue, subscription queue or exchange (defining alt-ex in node properties does not suffer from that). qpid-config can be used to display that the alt-ex setting was not applied (before the link is closed). Version-Release number of selected component (if applicable): qpid-cpp-mrg-0.14-14.el5 How reproducible: 100% Steps to Reproduce: 1. spout "test_q;{create: always, delete:always, link:{x-declare:{alternate-exchange:'amq.fanout'}}}" 2. use 'qpid-stat -e' to discover that no message arrived at the 'amq.fanout' OR 1. run the attached test reproducer 2. test fails with: "0 != 5 Assertion fail, All 5 messages should have been routed to the alt_exchange" Actual results: Alternate exchange defined in the link properties is not applied. Expected results: Alternate exchange defined in the link properties is applied. No failure by running the test reproducer.
Created attachment 593419 [details] test reproducer
Correction: The first reproduction scenario in Comment 1 is wrong (link properties won't apply on the node test_q): following reproduction scenario can be used instead: 1.) create a subscription queue that will be removed after one message fetch # drain -c 1 -t 60 "amq.direct/key;{link:{x-declare:{alternate-exchange:'amq.fanout'}}}" 2.) in the second cli send 6 messages to amq.direct: # spout -c 6 amq.direct/key 3.) use 'qpid-stat -e' to discover that no message arrived at the 'amq.fanout' Expected result: qpid-stat shows 5 messages on the 'amq.fanout' -- the second reproduction scenario (using the reproducer) is correct
(In reply to comment #2) Note: I've forget to mention that drain has to be slightly modified, it is necessary to add some sleep (ie.sleep(1)) before the link is closed, to guarantee that the messages are firstly delivered to the subscription queue.
(In reply to comment #0) Update/Clarification: - When the alternate exchange is defined in the link properties, the alternate - exchange setting is not applied, regardless if defined for queue, - subscription queue or exchange (defining alt-ex in node properties does not - suffer from that). + When the alternate exchange is defined in the link properties for a subscription queue, the alternate exchange setting is not applied.
Fixed upstream: http://svn.apache.org/viewvc?view=revision&revision=1358321
This issue has been fixed. Verified on rhel5.8 and rhel6.3 (x86_64, i386) packages used for testing: qpid-cpp-0.18-1 -> VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0561.html