Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 579681 - Topic exchange duplicates messages
Topic exchange duplicates messages
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
1.2
All Linux
high Severity medium
: 1.3
: ---
Assigned To: Ken Giusti
Frantisek Reznicek
:
Depends On:
Blocks: 568838
  Show dependency treegraph
 
Reported: 2010-04-06 05:10 EDT by Gordon Sim
Modified: 2015-11-15 20:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In a queue with multiple bindings to the same topic exchange, attempting to deliver a message with a routing key that matched more than one of these bindings caused such message to be delivered multiple times. To prevent this behavior, the broker now tracks all queues to which the message is routed, and no longer sends it to the same queue more than once.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-14 12:08:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0773 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Messaging and Grid Version 1.3 2010-10-14 11:56:44 EDT

  None (edit)
Description Gordon Sim 2010-04-06 05:10:32 EDT
Description of problem:

If a given queue is bound to a topic exchange with multiple bindings, a message sent to that exchange will result in a copy being enqueued for each binding that matches. This is incorrect - each message should be enqueued once if there is any binding to the queue that matches it.

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

1.2 and probably earlier

How reproducible:

100%

Steps to Reproduce:
1. create queue
2. bind it to amq.topic with two distinct bindings (e.g. red.* and *.hat)
3. send amq.topic a message whose routing key matches both patterns (e.g. red.hat)
4. check the queue
  
Actual results:

The message is enqueued on the queue twice.

Expected results:

The message should only be enqueued on the queue once.

Additional info:
Comment 1 Ken Giusti 2010-04-06 14:21:24 EDT
Fix submitted upstream:

http://svn.apache.org/viewcvs?view=rev&rev=931257
Comment 3 Frantisek Reznicek 2010-09-30 08:32:34 EDT
The issue has been fixed, tested on RHEL 4.8 / 5.5 i386 / x86_64 on packages:
python-qmf-0.7.946106-13.el5
python-qpid-0.7.946106-14.el5
qmf-*0.7.946106-17.el5
qpid-cpp-*-0.7.946106-17.el5
qpid-dotnet-0.4.738274-2.el5
qpid-java-*-0.7.946106-10.el5
qpid-tools-0.7.946106-11.el5
ruby-qmf-0.7.946106-17.el5
ruby-qpid-0.7.946106-2.el5


-> VERIFIED
Comment 4 Ken Giusti 2010-10-05 11:38:20 EDT
    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:  Binding a queue multiple times to a topic exchange and delivering a message with a routing key that matches more than one of the bindings.
* Consequence:  A copy of the message is queued for each matching binding, resulting in message duplication.
* Fix:  The broker will track which queues the message is delivered to, and remove duplicate queues.
* Result: One copy of the message will be delivered to the queue regardless of the number of matched bindings.
Comment 5 Jaromir Hradilek 2010-10-06 09:29:01 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1 @@
-* Cause:  Binding a queue multiple times to a topic exchange and delivering a message with a routing key that matches more than one of the bindings.
+In a queue with multiple bindings to the same topic exchange, attempting to deliver a message with a routing key that matched more than one of these bindings caused such message to be delivered multiple times. To prevent this behavior, the broker now tracks all queues to which the message is routed, and no longer sends it to the same queue more than once.-* Consequence:  A copy of the message is queued for each matching binding, resulting in message duplication.
-* Fix:  The broker will track which queues the message is delivered to, and remove duplicate queues.
-* Result: One copy of the message will be delivered to the queue regardless of the number of matched bindings.
Comment 7 errata-xmlrpc 2010-10-14 12:08:01 EDT
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/RHSA-2010-0773.html

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