[
https://issues.apache.org/jira/browse/QPID-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13790275#comment-13790275
]
Keith Wall commented on QPID-5219:
----------------------------------
The above configuration causes the client to send a basic.publish with a
routing key as zero length shortstr. On delivery to the consuming client, the
zero length shortstr is considered as a null
(ByteArrayDataInput#readAMQShortString()). Later on the null routing key breaks
a pre-condition within the AMQDestination constructor and the
IllegalArgumentException results.
It is not completely clear to me where the root cause of the problem lies.
The AMQP specs 0.8..0-9.1 do not say anything explicit about publishing with
zero length routing keys but it does say that the headers exchange type does
not use the routing key - implying it would be reasonable for the routing key
to be zero length in at least that case. This, coupled with the robustness
principle suggests to me that the client should be changed to accept messages
with such routing keys.
> Receiving message sent to topic specified with a binding url with empty topic
> subscription kills dispatcher
> -----------------------------------------------------------------------------------------------------------
>
> Key: QPID-5219
> URL: https://issues.apache.org/jira/browse/QPID-5219
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker, Java Client
> Affects Versions: 0.25
> Reporter: Keith Wall
>
> If I use the following in my JNDI properties
> {code}
> destination.mytopic= BURL:topic://amq.topic// # a destination with empty
> topic subscription
> {code}
> I can successfully publish messages to the topic, but if I try and consume,
> the #receive() call appears to hang. Turning on logging for o.a.q on the
> client shows that the dispatcher thread has suffered an exception and has
> died whilst it tried to create the JMS message.
> "Topic Subscription" is as defined
> https://cwiki.apache.org/confluence/display/qpid/BindingURLFormat#BindingURLFormat-Topics
> {noformat}
> 2013-10-09 12:10:26,369 ERROR [Dispatcher-1-Conn-1] [BasicMessageConsumer]
> Caught exception (dump follows) - ignoring...
> java.lang.IllegalArgumentException: routing/binding key must not be null
> at org.apache.qpid.client.AMQDestination.<init>(AMQDestination.java:338)
> at org.apache.qpid.client.AMQDestination.<init>(AMQDestination.java:328)
> at org.apache.qpid.client.AMQDestination.<init>(AMQDestination.java:322)
> at org.apache.qpid.client.AMQTopic.<init>(AMQTopic.java:63)
> at
> org.apache.qpid.client.AMQSession_0_8$TopicDestinationCache.newDestination(AMQSession_0_8.java:876)
> at
> org.apache.qpid.client.AMQSession_0_8$TopicDestinationCache.newDestination(AMQSession_0_8.java:1)
> at
> org.apache.qpid.client.AMQSession_0_8$DestinationCache.getDestination(AMQSession_0_8.java:863)
> at
> org.apache.qpid.client.message.AMQMessageDelegate_0_8.<init>(AMQMessageDelegate_0_8.java:117)
> at
> org.apache.qpid.client.message.AbstractJMSMessageFactory.create08MessageWithBody(AbstractJMSMessageFactory.java:103)
> at
> org.apache.qpid.client.message.AbstractJMSMessageFactory.createMessage(AbstractJMSMessageFactory.java:160)
> at
> org.apache.qpid.client.message.MessageFactoryRegistry.createMessage(MessageFactoryRegistry.java:127)
> at
> org.apache.qpid.client.BasicMessageConsumer_0_8.createJMSMessageFromUnprocessedMessage(BasicMessageConsumer_0_8.java:118)
> at
> org.apache.qpid.client.BasicMessageConsumer_0_8.createJMSMessageFromUnprocessedMessage(BasicMessageConsumer_0_8.java:1)
> at
> org.apache.qpid.client.BasicMessageConsumer.notifyMessage(BasicMessageConsumer.java:712)
> at
> org.apache.qpid.client.AMQSession$Dispatcher.notifyConsumer(AMQSession.java:3388)
> at
> org.apache.qpid.client.AMQSession$Dispatcher.dispatchMessage(AMQSession.java:3327)
> at
> org.apache.qpid.client.AMQSession$Dispatcher.access$1(AMQSession.java:3290)
> at org.apache.qpid.client.AMQSession.dispatch(AMQSession.java:3107)
> at
> org.apache.qpid.client.message.UnprocessedMessage.dispatch(UnprocessedMessage.java:54)
> at
> org.apache.qpid.client.AMQSession$Dispatcher.run(AMQSession.java:3250)
> at java.lang.Thread.run(Thread.java:662)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]