Bug 876192 - Broker object is not deleted when Spout is used
Summary: Broker object is not deleted when Spout is used
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 2.3
: ---
Assignee: Rajith Attapattu
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-13 14:26 UTC by Petr Matousek
Modified: 2013-03-19 16:41 UTC (History)
4 users (show)

Fixed In Version: qpid-java-0.18-6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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