Bug 876192 - Broker object is not deleted when Spout is used
Broker object is not deleted when Spout is used
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java (Show other bugs)
Unspecified Unspecified
medium Severity medium
: 2.3
: ---
Assigned To: Rajith Attapattu
Petr Matousek
: Regression
Depends On:
  Show dependency treegraph
Reported: 2012-11-13 09:26 EST by Petr Matousek
Modified: 2013-03-19 12:41 EDT (History)
4 users (show)

See Also:
Fixed In Version: qpid-java-0.18-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Petr Matousek 2012-11-13 09:26:22 EST
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:

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 18:04:59 EST
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 18:19:31 EST
I have added fix for the specific issue mentioned in the BZ
Comment 7 Petr Matousek 2013-01-07 07:08:59 EST
This issue has been fixed.

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

packages used for testing:


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