Bug 834256 - Alternate exchange is not applied when defined in the link properties
Alternate exchange is not applied when defined in the link properties
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
2.1.2
Unspecified Unspecified
medium Severity high
: 2.3
: ---
Assigned To: Gordon Sim
Petr Matousek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-21 07:04 EDT by Petr Matousek
Modified: 2013-03-06 13:56 EST (History)
4 users (show)

See Also:
Fixed In Version: qpid-cpp-0.18-1
Doc Type: Bug Fix
Doc Text:
Cause: The alternate-exchange option in an x-declare clause within the link-options of an address was being ignored. Consequence: The alternate exchange property could not be controlled via the link options. Fix: Alternate exchange option is not checked and used if specified. Result: The alternate-exchange can be controlled on queues created through the link options in an address.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-06 13:56:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test reproducer (1.67 KB, text/x-c++src)
2012-06-21 07:07 EDT, Petr Matousek
no flags Details

  None (edit)
Description Petr Matousek 2012-06-21 07:04:06 EDT
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.
Comment 1 Petr Matousek 2012-06-21 07:07:40 EDT
Created attachment 593419 [details]
test reproducer
Comment 2 Petr Matousek 2012-06-22 05:42:27 EDT
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
Comment 3 Petr Matousek 2012-06-22 07:12:57 EDT
(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.
Comment 4 Petr Matousek 2012-06-22 08:12:39 EDT
(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.
Comment 5 Gordon Sim 2012-07-06 14:07:42 EDT
Fixed upstream: http://svn.apache.org/viewvc?view=revision&revision=1358321
Comment 7 Petr Matousek 2012-10-27 08:59:30 EDT
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
Comment 9 errata-xmlrpc 2013-03-06 13:56:08 EST
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

Note You need to log in before you can comment on or make changes to this bug.