On 11/3/2013 5:02 AM, boden wrote:
Sorry for resend; my previous email got marked as a response to a different thread...I'm running into an issue with the qpid C++ broker (version 0.22) related to a non-exclusive exchange queue getting deleted when sessions are still active. Scenario: - Open 2 connections/sessions to a single non-exclusive exchange. The node is set to auto-delete, and link is not. - Close connection 1. - The close of connection 1 deletes the exchange queue, even though a connection/session is still open to it (connection 2). It was my understanding that the exchange queue would not get deleted until the last session/connection disconnected, but it appears it gets deleted on the 1st disconnect. Is this proper behavior? Sample program to repo: from qpid.messaging import * import time conn = Connection("qpidclient/mypasswd@localhost:5672") conn2 = Connection("qpidclient/mypasswd@localhost:5672") try: conn.open() conn2.open() session = conn.session() session2 = conn2.session() rev = session.receiver('nova/test ; {"node": {"x-declare": {"auto-delete": true, "durable": true}, "type": "topic"}, "create": "always", "link": {"x-declare": {"auto-delete": false, "exclusive": false, "durable": false}, "durable": true, "name": "test"}}') rev2 = session2.receiver('nova/test ; {"node": {"x-declare": {"auto-delete": true, "durable": true}, "type": "topic"}, "create": "always", "link": {"x-declare": {"auto-delete": false, "exclusive": false, "durable": false}, "durable": true, "name": "test"}}') print("sleeping...") time.sleep(20) print("closing conn 1") conn.close() time.sleep(30) except MessagingError,m: print str(m) print("closing conn2") conn2.close() If you run the above on the version 0.22 c++ broker you'll get: sleeping... closing conn 1 closing conn2 Traceback (most recent call last): File "./qpidc.py", line 26, in <module> conn2.close() File "<string>", line 6, in close File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 321, in close ssn.close(timeout=timeout) File "<string>", line 6, in close File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 747, in close link.close(timeout=timeout) File "<string>", line 6, in close File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 1055, in close if not self.session._ewait(lambda: self.closed, timeout=timeout): File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 572, in _ewait self.check_error() File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 561, in check_error raise self.error qpid.messaging.exceptions.NotFound: not-found: Delete failed. No such queue: test (/opt/build/jenkins/workspace/rpmbuild-qpid-cpp-0.22-x86_64/rpmbuild/BUILD/qpid-0.22/cpp/src/qpid/broker/Broker.cpp:1184)(404) Any feedback is appreciated. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
It appears this might be my issue: https://issues.apache.org/jira/browse/QPID-4903?jql=project%20in%20(QPID%2C%20PROTON)%20and%20text%20~%20'delete'%20order%20by%20updatedDate%20desc
if I'm reading properly, it looks like a small patch.. I will investigate manually patching the diff on qpid 0.22 python client
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
