Asserting does not work correctly from JMS
------------------------------------------
Key: QPID-3677
URL: https://issues.apache.org/jira/browse/QPID-3677
Project: Qpid
Issue Type: Bug
Components: Java Client
Affects Versions: 0.14
Reporter: Gordon Sim
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)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]