Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 557159 - Queue-Purge does not send messages to alternate-exchange
Queue-Purge does not send messages to alternate-exchange
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf (Show other bugs)
1.2
All Linux
high Severity medium
: 1.3
: ---
Assigned To: Ted Ross
Jan Sarenik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-20 10:52 EST by Ted Ross
Modified: 2011-08-12 12:02 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When a queue with an alternate exchange was deleted, its messages were sent to the alternate exchange. When such a queue was purged via the management command, the messages were not sent to the alternate exchange. With this update, the alternate exchange contains an equal number of messages as those purged from the queue.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-14 12:10:54 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 Ted Ross 2010-01-20 10:52:57 EST
Description of problem:

When a queue with an alternate exchange is deleted, its messages are sent to the alternate exchange.  When such a queue is purged via the management command, the messages are not sent to the alternate exchange.

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

1.2

How reproducible:

100%

Steps to Reproduce:
1. Create a queue with an alternate exchange

$ qpid-config add queue test --alternate-exchange amq.fanout

2. Produce messages that get placed into the queue
3. Purge the queue (using qpid-tool)
4. Using qpid-stat -e, check the counters on amq.fanout (the alternate)
  
Actual results:

amq.fanout has no msgIn count.

Expected results:

amq.fanout should have msgIn equal to the number of messages purged from the queue.


Additional info:
Comment 2 Ted Ross 2010-02-02 08:03:13 EST
Fixed upstream at revision 904654.

The Queue.Purge method was not changed, a new method was added called "Reroute" which provides the needed functionality.  Reroute allows removed messages to be sent to the alternate exchange, or any other exchange by name.
Comment 4 Jan Sarenik 2010-10-05 08:16:49 EDT
I doubt it is working in current candidate:

# Start fresh qpidd
qpid-config add queue test --alternate-exchange amq.fanout
qpid-stat -q | grep test
echo "test" | /opt/rh-qpid/clients/sender --routing-key test
qpid-stat -q | grep test
# You should see one message being added
qpid-stat -e | grep amq.fanout 
# No messages are in this exchange so far
qpid-tool
#  list queue
#  show <test-queue.ID>
#  call <test-queue.ID> purge 0
#  # wait few seconds
#  show <test-queue.ID>
#  # you should see the message is not there already
qpid-stat -e | grep amq.fanout 
# no, it does not get to fanout

When you run "qpid-config del queue test --force" instead of
purging it via qpid-tool, the final qpid-stat proves that the
messages go into the amq.fanout.

Tested on
  python-qpid-0.7.946106-14.el5
  python-qmf-0.7.946106-13.el5
  qpid-cpp-server-0.7.946106-17.el5
  qpid-tools-0.7.946106-11.el5
Comment 5 Jan Sarenik 2010-10-05 08:39:49 EDT
Sorry, according to comment #2 I should not call "purge" method
anymore, but the "reroute" one.
Comment 6 Jan Sarenik 2010-10-05 08:54:35 EDT
Verified on i386 and x86_64 RHEL4
  qpid-cpp-server-0.7.946106-17.el4
  python-qpid-0.7.946106-14.el4
  python-qmf-0.7.946106-13.el4
  qpid-tools-0.7.946106-11.el4

and x86_64 RHEL5
  python-qpid-0.7.946106-14.el5
  python-qmf-0.7.946106-13.el5
  qpid-cpp-server-0.7.946106-17.el5
  qpid-tools-0.7.946106-11.el5
Comment 7 Jan Sarenik 2010-10-06 04:14:45 EDT
call <test-queue.ID> reroute true amq.fanout

Verified also on RHEL5 i386
  python-qpid-0.7.946106-14.el5
  python-qmf-0.7.946106-13.el5
  qpid-cpp-server-0.7.946106-17.el5
  qpid-tools-0.7.946106-11.el5
Comment 8 Martin Prpič 2010-10-07 09:50: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:
When a queue with an alternate exchange was deleted, its messages were sent to the alternate exchange. When such a queue was purged via the management command, the messages were not sent to the alternate exchange. With this update, the alternate exchange contains an equal number of messages as those purged from the queue.
Comment 10 errata-xmlrpc 2010-10-14 12:10:54 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.