Bug 664486 - Queue reroute doesn't honor alternate exchange
Summary: Queue reroute doesn't honor alternate exchange
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 1.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 2.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-20 15:12 UTC by Andy Goldstein
Modified: 2011-06-23 15:45 UTC (History)
7 users (show)

Fixed In Version: qpid-cpp-0.9.1079953
Doc Type: Bug Fix
Doc Text:
Cause: The reroute management method allowed the messages to be rerouted to a specified exchange, but if there were no matching bindings messages would then be dropped even if that exchange had an alternate-exchange defined. Consequence: Messages could be dropped unnecessarily or alternate-exchanges were less useful if they could not be relied on for reroute. Fix: Modified broker to reroute the messages through the alternate-exchange of the originally specified exchange if defined. Result:
Clone Of:
Environment:
Last Closed: 2011-06-23 15:45:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0890 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 2.0 Release 2011-06-23 15:42:41 UTC

Description Andy Goldstein 2010-12-20 15:12:01 UTC
Description of problem: When invoking the reroute method on a queue, messages delivered to an exchange are dropped instead of being delivered to the exchange's alternate exchange if no bindings match.


Version-Release number of selected component (if applicable): 1.3


How reproducible: 100%


Steps to Reproduce:
1. Create 2 exchanges A and B (fanout) where B is the alternate exchange for A
2. Bind queue X to B
2. Send 1 message to queue Y
3. Call reroute on queue Y and specify that messages should be sent to exchange A
  
Actual results: queues Y and X are empty


Expected results: queue Y should be empty, but queue X should have 1 message in it (the message that was rerouted from Y)


Additional info: it looks like queue's reroute() method invokes exchange's route() method directly.  It appears, however, that SemanticState is responsible for routing messages to an exchange's alternate exchange.

Comment 1 Ted Ross 2010-12-20 15:18:56 UTC
The issue here is that once a message has been delivered to a queue, it will never again be eligible to be sent to an alternate-exchange during a re-route.  Re-routed messages must be treated as newly produced messages so they can be sent to an alternate if there are not matching bindings at the exchange to which they were re-routed.

Comment 2 Gordon Sim 2011-03-07 13:35:31 UTC
Fixed upstream: http://svn.apache.org/viewvc?rev=1078763&view=rev

Comment 3 Gordon Sim 2011-03-07 13:35:32 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
The reroute management method allowed the messages to be rerouted to a specified exchange, but if there were no matching bindings messages would then be dropped even if that exchange had an alternate-exchange defined.
 
Consequence:
Messages could be dropped unnecessarily or alternate-exchanges were less useful if they could not be relied on for reroute.

Fix:
Modified broker to reroute the messages through the alternate-exchange of the originally specified exchange if defined.

Result:

Comment 4 Petr Matousek 2011-04-08 14:17:43 UTC
This issue has been fixed

Verified on RHEL4.9, RHEL5.6 and RHEL6.1, architectures: i386, x86_64

packages installed:
python-qpid-0.10-1.el5
python-qpid-qmf-0.10-2.el5
qpid-cpp-client-0.10-1.el5
qpid-cpp-client-devel-0.10-1.el5
qpid-cpp-client-devel-docs-0.10-1.el5
qpid-cpp-client-ssl-0.10-1.el5
qpid-cpp-server-0.10-1.el5
qpid-cpp-server-cluster-0.10-1.el5
qpid-cpp-server-devel-0.10-1.el5
qpid-cpp-server-ssl-0.10-1.el5
qpid-cpp-server-store-0.10-1.el5
qpid-cpp-server-xml-0.10-1.el5
qpid-java-client-0.10-1.el5
qpid-java-common-0.10-1.el5
qpid-java-example-0.10-1.el5
qpid-qmf-0.10-2.el5
qpid-qmf-devel-0.10-2.el5
qpid-tools-0.10-1.el5

-> VERIFIED

Comment 5 errata-xmlrpc 2011-06-23 15:45:10 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0890.html


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