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

Bug 876192

Summary: Broker object is not deleted when Spout is used
Product: Red Hat Enterprise MRG Reporter: Petr Matousek <pematous>
Component: qpid-javaAssignee: Rajith Attapattu <rattapat+nobody>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Matousek <pematous>
Severity: medium Docs Contact:
Priority: medium    
Version: DevelopmentCC: iboverma, jross, lzhaldyb, mcressma
Target Milestone: 2.3Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-java-0.18-6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Matousek 2012-11-13 14:26:22 UTC
Description of problem:

It is unable to remove broker object with Spout client using 'delete' action in the address string (please see Steps to Reproduce below).

This issue is very similar to Bug 672534 with just only one difference that the bug is related to Drain, not Spout. The difference here is also that the object was removed in the past (using Spout), but starting from qpid-java-*-0.18-4 it is not. Therefore this bug contains the keyword regression.

There is an existing workaround for Bug 672534, that workaround can also be applied to this issue. (When the producer/consumer is closed before the session is closed the object is removed as expected). 

It is possible that the change is intended, and some next commit will solve both the issues, but at this moment neither Spout nor Drain(Bug 672534) do not remove the broker object when action 'delete' is used in the address string.

Version-Release number of selected component (if applicable):
qpid-java-*-0.18-4 and later

How reproducible:
100%

Steps to Reproduce:
1. java -cp ${CLASSPATH} org.apache.qpid.example.Spout  "q;{create:sender}"
2. java -cp ${CLASSPATH} org.apache.qpid.example.Spout  "q;{delete:sender}"
3. qpid-stat -q (queue 'q' wasn't removed)

  
Actual results:
The broker object is not deleted even if delete is requested in the address string

Expected results:
The broker object is deleted if delete is requested in the address string

Comment 3 Rajith Attapattu 2012-12-05 23:04:59 UTC
I will add a consumer.close() and a producer.close() for Drain and Spout respectiely, which should fix the issue mentioned in the BZ.

However this will merely fix Drain and Spout, not the issue real underlying issue.

As explained in bz 672534, unfortunately there is no resonable fix for this problem. This is a more general issue with the client.

The workaround given is actually very reasonable and good practise to follow. That is closing your consumers and producers explicitly.

Comment 4 Rajith Attapattu 2012-12-05 23:19:31 UTC
I have added fix for the specific issue mentioned in the BZ
http://svn.apache.org/viewvc?rev=1417692&view=rev

Comment 7 Petr Matousek 2013-01-07 12:08:59 UTC
This issue has been fixed.

Verified on rhel5.9rc and rhel6.3 (x86_64, i386)

packages used for testing:
qpid-java-*-0.18-6

-> VERIFIED