Qpid
  1. Qpid
  2. QPID-4903

python client deletes subscription queue even if it was declared to not be exclusive

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.18
    • Fix Version/s: 0.23
    • Component/s: Python Client
    • Labels:
      None
    • Environment:

      Redhat 6.3

      Description

      node_name = 'tt'
      link_name = "%s_link_2" %(node_name)
      addr_opts = {
      "create": "always",
      "node": {
      "type": "topic",
      "x-declare":

      { "durable": True, "auto-delete": True, }

      ,
      },
      "link": {
      "name": link_name,
      "durable": True,
      "x-declare":

      { "durable": False, "auto-delete": True, "exclusive": False, }

      ,
      },
      }
      addr = "%s ; %s" %(node_name, addr_opts)

      According to AMQP 0-10, in queue x-declare exclusive is not set and auto-delete is set, the queue is deleted when all the
      consumers have finished using it.

      Howerver, I use example drain to test it:
      I set address above, then I run it ./drain -t 180, let me mark it node1
      Next, I login another terminal run ./drain -t 3, let me mark it node2
      After 3 senconds, node2 stop normally, but node1 print these results. I think the queue link_2 should not be removed, because consumer on node1 is still exists.

      Traceback (most recent call last):
      File "./drain_2.py", line 107, in <module>
      msg = rcv.fetch(timeout=timeout)
      File "<string>", line 6, in fetch
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 1016, in fetch
      msg = self.session._get(self, timeout=timeout)
      File "<string>", line 6, in _get
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 649, in _get
      timeout):
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 567, in _ewait
      self.check_error()
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 556, in check_error
      raise self.error
      qpid.messaging.exceptions.SessionError: Queue tt_link_2 has been deleted. (qpid/broker/Queue.cpp:1787)(408)

        Activity

        Hide
        Rob Godfrey added a comment -

        Were you testing against the C++ Broker, the Java Broker, or both?

        Show
        Rob Godfrey added a comment - Were you testing against the C++ Broker, the Java Broker, or both?
        Hide
        Minmin Ren added a comment -

        I use the c++ Broker only.

        Show
        Minmin Ren added a comment - I use the c++ Broker only.
        Hide
        Gordon Sim added a comment -

        This is an issue with the python client. It is issuing an explicit delete when closing the link, regardless of whether the subscription queue is exclusive or not.

        Show
        Gordon Sim added a comment - This is an issue with the python client. It is issuing an explicit delete when closing the link, regardless of whether the subscription queue is exclusive or not.
        Hide
        Minmin Ren added a comment -

        Then will someone to fix it?

        Show
        Minmin Ren added a comment - Then will someone to fix it?
        Hide
        ASF subversion and git services added a comment -

        Commit 1490240 from Gordon Sim
        [ https://svn.apache.org/r1490240 ]

        QPID-4903: don't delete subscription queue when closing link if it was explicitly declared non-exclusive

        Show
        ASF subversion and git services added a comment - Commit 1490240 from Gordon Sim [ https://svn.apache.org/r1490240 ] QPID-4903 : don't delete subscription queue when closing link if it was explicitly declared non-exclusive
        Hide
        Justin Ross added a comment -
        Show
        Justin Ross added a comment - Released in Qpid 0.24, http://qpid.apache.org/releases/qpid-0.24/index.html

          People

          • Assignee:
            Gordon Sim
            Reporter:
            Minmin Ren
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development