Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-8201

[Broker-J] [AMQP1.0] Queue backing temporary subscription deleted twice during link close

    XMLWordPrintableJSON

Details

    Description

      Running the following code using the Qpid JMS Client (I am using master) that creates a temporary topic subscription and then immediately closes the consumer, exposes a defect in the Broker-J.   Internally Broker-J is cleaning up the queue backing the temporary subscription twice.  The second attempt fails, which causes the detach performative to carry a spurious error amqp:not-found.

       The Qpid JMS Client appears to ignore the error, so there may not be an impact to applications using this client.  I have not checked other AMQP 1.0 clients.

       

      Context context = new InitialContext();
      
      ConnectionFactory factory = (ConnectionFactory) context.lookup("myFactoryLookup");
      Destination topic = (Destination) context.lookup("myTopicLookup");
      
      Connection connection = factory.createConnection(System.getProperty("USER"), System.getProperty("PASSWORD"));
      
      Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      
      MessageConsumer messageConsumer = session.createConsumer(topic);
      messageConsumer.close();

       

      [154612396:0] -> Open{ containerId='ID:29fbab21-96a9-45a9-ba6d-05b1744b9ce3:1', hostname='localhost', maxFrameSize=1048576, channelMax=32767, idleTimeOut=30000, outgoingLocales=null, incomingLocales=null, offeredCapabilities=null, desiredCapabilities=[sole-connection-for-container, DELAYED_DELIVERY, ANONYMOUS-RELAY, SHARED-SUBS], properties={product=QpidJMS, version=0.33.0-SNAPSHOT, platform=JVM: 1.8.0_171, 25.171-b10, Oracle Corporation, OS: Linux, 4.16.8-300.fc28.x86_64, amd64}}
      [154612396:0] <- Open{ containerId='a73d8803-f5bd-46c8-90d3-b3ae6754e681', hostname='null', maxFrameSize=262144, channelMax=255, idleTimeOut=0, outgoingLocales=null, incomingLocales=null, offeredCapabilities=[ANONYMOUS-RELAY, SHARED-SUBS, sole-connection-for-container], desiredCapabilities=null, properties={product=qpid, version=7.1.0-SNAPSHOT, qpid.build=, qpid.instance_name=Broker, qpid.virtualhost_properties_supported=true, sole-connection-detection-policy=0}}
      [154612396:0] -> Begin{remoteChannel=null, nextOutgoingId=1, incomingWindow=2047, outgoingWindow=2147483647, handleMax=65535, offeredCapabilities=null, desiredCapabilities=null, properties=null}
      [154612396:0] <- Begin{remoteChannel=0, nextOutgoingId=0, incomingWindow=8192, outgoingWindow=2048, handleMax=4294967295, offeredCapabilities=null, desiredCapabilities=null, properties=null}
      [154612396:1] -> Begin{remoteChannel=null, nextOutgoingId=1, incomingWindow=2047, outgoingWindow=2147483647, handleMax=65535, offeredCapabilities=null, desiredCapabilities=null, properties=null}
      [154612396:1] <- Begin{remoteChannel=1, nextOutgoingId=0, incomingWindow=8192, outgoingWindow=2048, handleMax=4294967295, offeredCapabilities=null, desiredCapabilities=null, properties=null}
      [154612396:1] -> Attach{name='qpid-jms:receiver:ID:1537beab-fd64-4d97-ae27-3b888ee072a6:1:1:1:foo', handle=0, role=RECEIVER, sndSettleMode=UNSETTLED, rcvSettleMode=FIRST, source=Source{address='foo', durable=NONE, expiryPolicy=LINK_DETACH, timeout=0, dynamic=false, dynamicNodeProperties=null, distributionMode=null, filter=null, defaultOutcome=Modified{deliveryFailed=true, undeliverableHere=null, messageAnnotations=null}, outcomes=[amqp:accepted:list, amqp:rejected:list, amqp:released:list, amqp:modified:list], capabilities=[topic]}, 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=null, properties=null}
      [154612396:1] <- Attach{name='qpid-jms:receiver:ID:1537beab-fd64-4d97-ae27-3b888ee072a6:1:1:1:foo', handle=0, role=SENDER, sndSettleMode=UNSETTLED, rcvSettleMode=FIRST, source=Source{address='foo', durable=NONE, expiryPolicy=LINK_DETACH, 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=[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={}}
      [154612396:1] -> Flow{nextIncomingId=0, incomingWindow=2047, nextOutgoingId=1, outgoingWindow=2147483647, handle=0, deliveryCount=0, linkCredit=1000, available=null, drain=false, echo=false, properties=null}
      [154612396:1] -> Detach{handle=0, closed=true, error=null}
      [154612396:1] <- Detach{handle=0, closed=true, error=Error{condition=amqp:not-found, description='Queue 'qpidsub_/ID:29fbab21-96a9-45a9-ba6d-05b1744b9ce3:1_/c5a47fa5-3a5d-4329-adce-53f0d314bd88_/nondurable' was not found', info=null}}
      [154612396:0] -> Close{error=null}
      [154612396:0] <- Close{error=null}

      Attachments

        Activity

          People

            orudyy Alex Rudyy
            kwall Keith Wall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: