Uploaded image for project: 'Qpid JMS'
  1. Qpid JMS
  2. QPIDJMS-346

No Exception thrown when server indicates error unsubscribing from durable subscription

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.27.0
    • 0.28.0
    • qpid-jms-client
    • None

    Description

      Testing the shared durable subscription functionality against Qpid Broker-J I found that if I attempted to unsubscribe a shared durable subscription from client A, while still having an active consumer from client B, then no exception was thrown in client A.

      The protocol trace from the client A is as follows:

      [362461018:0] -> Attach{name='myDurableSub|global', handle=0, role=RECEIVER, sndSettleMode=UNSETTLED, rcvSettleMode=FIRST, source=null, target=Target{address='null', durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=false, dynamicNodeProperties=null, capabilities=null}, unsettled=null, incompleteUnsettled=false, initialDeliveryCount=null, maxMessageSize=null, offeredCapabilities=null, desiredCapabilities=[shared, global], properties=null}
      [362461018:0] <- Attach{name='myDurableSub|global', handle=0, role=SENDER, sndSettleMode=UNSETTLED, rcvSettleMode=FIRST, source=Source{address='topic', durable=CONFIGURATION, expiryPolicy=NEVER, timeout=0, dynamic=false, dynamicNodeProperties=null, distributionMode=copy, filter=null, defaultOutcome=Modified{deliveryFailed=true, undeliverableHere=null, messageAnnotations=null}, outcomes=[amqp:accepted:list, amqp:released:list, amqp:rejected:list], capabilities=[global, shared, topic]}, target=Target{address='null', durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=false, dynamicNodeProperties=null, capabilities=null}, unsettled={}, incompleteUnsettled=false, initialDeliveryCount=0, maxMessageSize=null, offeredCapabilities=[SHARED-SUBS], desiredCapabilities=null, properties={}}
      [362461018:0] -> Detach{handle=0, closed=true, error=null}
      [362461018:0] <- Detach{handle=0, closed=true, error=Error{condition=amqp:resource-locked, description='There are consumers on Queue 'qpidsub_/_global__/myDurableSub_/durable'', info=null}}
      [362461018:0] -> Close{error=null}
      [362461018:0] <- Close{error=null}
      

      While the broker is sending back a detach with closed=true (which is essentially accurate) it is also providing an error. The JMS API docs have this to say:

      It is erroneous for a client to delete a durable subscription while there is an active (not closed) consumer for the subscription, or while a consumed message is part of a pending transaction or has not been acknowledged in the session.

      So I presume we should be triggering off the fact that the broker sent detach contains an error to throw an appropriate JMSException

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            rgodfrey Robert Godfrey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: