Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 674678

Summary: Closed Receivers Do Not Delete Queues and Do Not Reroute Acquired Messages to Alternate Exchange
Product: Red Hat Enterprise MRG Reporter: Chris Pitman <christopher.pitman>
Component: qpid-cppAssignee: Jonathan Robie <jonathan.robie>
Status: CLOSED ERRATA QA Contact: Petr Matousek <pematous>
Severity: high Docs Contact:
Priority: unspecified    
Version: DevelopmentCC: gsim, jeder, jneedle, jross, pematous
Target Milestone: 2.0   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qpid-cpp-0.9.1079953 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-23 15:43:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Source for reproducing error
none
Ruby example none

Description Chris Pitman 2011-02-02 21:39:59 UTC
Created attachment 476663 [details]
Source for reproducing error

Description of problem:
When a receiver is created with a qpid::messaging::Address which includes "delete:always", and then messages are palced in the queue, and the receiver closed, messages which have been acquired by the receiver stay in the queue and the queue is not deleted.

Version-Release number of selected component (if applicable):
qpid-cpp-client-devel-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-mrg-debuginfo-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-server-cluster-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-server-store-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-server-rdma-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-server-devel-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-client-ssl-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-client-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-server-ssl-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-client-devel-docs-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-client-rdma-0.7.946106-24_ptc_hotfix_2.el5
qpid-cpp-server-0.7.946106-24_ptc_hotfix_2.el5

How reproducible:
Example programs attached

Steps to Reproduce:
1. Run a broker on port 5673 (or modify script)
2. Compile and run close_test.cpp
  
Actual results:
5 Messages are received by a receiver listening to the alternate exchange.
qpid-stat shows that the original queue still exists and that 5 messages are still in the queue, which is the capacity of the original receiver.

Expected results:
10 Messages are received by the receiver.

Additional info:
Also attached is a jruby test case that performs a similar test.

Comment 1 Chris Pitman 2011-02-02 21:40:27 UTC
Created attachment 476664 [details]
Ruby example

Comment 2 Jonathan Robie 2011-02-07 18:24:39 UTC
Fixed in revision 1068042.

Comment 3 Gordon Sim 2011-02-08 17:39:47 UTC
Revision r1068042 was incorrect and was reverted.

Comment 4 Jonathan Robie 2011-02-09 20:27:02 UTC
Fixed in revision 1069030.

Comment 5 Jonathan Robie 2011-02-09 20:36:04 UTC
 The C++ messaging client library now releases pending messages when a Receiver is closed.

This only releases messages in the client's cache that have not been read. It does not release messages that have been read by the client application, but not acknowledged.

Comment 6 Gordon Sim 2011-02-24 11:49:46 UTC
Fix available in https://brewweb.devel.redhat.com/buildinfo?buildID=157935

Comment 7 Petr Matousek 2011-04-26 07:50:44 UTC
The issue has been fixed

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

Verification done with c++ reproducer only - unable to verify the issue with ruby reproducer, because ruby High Level Api packages are no available yet.

packages installed:
qpid-cpp-client-0.10-3.el6.x86_64
qpid-cpp-client-devel-0.10-3.el6.x86_64
qpid-cpp-client-devel-docs-0.10-3.el6.noarch
qpid-cpp-client-rdma-0.10-3.el6.x86_64
qpid-cpp-client-ssl-0.10-3.el6.x86_64
qpid-cpp-server-0.10-3.el6.x86_64
qpid-cpp-server-cluster-0.10-3.el6.x86_64
qpid-cpp-server-devel-0.10-3.el6.x86_64
qpid-cpp-server-rdma-0.10-3.el6.x86_64
qpid-cpp-server-ssl-0.10-3.el6.x86_64
qpid-cpp-server-store-0.10-3.el6.x86_64
qpid-cpp-server-xml-0.10-3.el6.x86_64
qpid-qmf-0.10-6.el6.x86_64
qpid-qmf-devel-0.10-6.el6.x86_64
qpid-tools-0.10-3.el6.noarch
ruby-qpid-0.7.946106-2.el6.x86_64
ruby-qpid-qmf-0.10-6.el6.x86_64

-> VERIFIED

Comment 8 errata-xmlrpc 2011-06-23 15:43:31 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