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
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.
I have added fix for the specific issue mentioned in the BZ http://svn.apache.org/viewvc?rev=1417692&view=rev
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