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

Asserting does not work correctly from JMS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 0.14
    • None
    • JMS AMQP 0-x

    Description

      When there is an exchange named abc, the following address should result in an error being raised:

      'abc; {assert: always, node: {type: queue}}'

      There is indeed an error raised, but the message is incorrect:

      org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue

      More importantly however, changing the node type to topic should result in the resolution and checking passing without error. This is not the case however. Using:

      'abc; {assert: always, node: {type: topic}}'

      we get exactly the same error.

      Attempting to assert on the exchange type (assuming abc is of type topic):

      'abc; {assert: always, node: {type: topic, x-declare:

      {type:fanout}

      }}'

      should result in an error due to mismatched expectations on exchange type. However we get the same incorrect exception as above, i.e:

      org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue

      And again, if we change the address so that it should pass:

      'abc; {assert: always, node: {type: topic, x-declare:

      {type:topic}

      }}'

      we then get:

      Exception in thread "main" java.lang.NullPointerException
      at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:626)
      at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:83)
      at org.apache.qpid.client.AMQSession.consumeFromQueue(AMQSession.java:2592)
      at org.apache.qpid.client.AMQSession.registerConsumer(AMQSession.java:2928)
      at org.apache.qpid.client.AMQSession.access$500(AMQSession.java:120)
      at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2048)
      at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2006)
      at org.apache.qpid.client.AMQConnectionDelegate_0_10.executeRetrySupport(AMQConnectionDelegate_0_10.java:346)
      at org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:574)
      at org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
      at org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:2004)
      at org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:979)
      at org.apache.qpid.example.Drain.<init>(Drain.java:70)
      at org.apache.qpid.example.Drain.main(Drain.java:103)

      Attachments

        Activity

          People

            Unassigned Unassigned
            gsim Gordon Sim
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: