qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boden <bo...@linux.vnet.ibm.com>
Subject qpid c++ broker deletes non exclusive queue when sessions are open
Date Sun, 03 Nov 2013 09:58:59 GMT
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: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message