Red Hat Bugzilla – Bug 557159
Queue-Purge does not send messages to alternate-exchange
Last modified: 2011-08-12 12:02:48 EDT
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:
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.
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
Sorry, according to comment #2 I should not call "purge" method anymore, but the "reroute" one.
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
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
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.
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