[
https://issues.apache.org/jira/browse/QPID-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13847456#comment-13847456
]
Keith Wall edited comment on QPID-5420 at 1/5/14 9:44 PM:
----------------------------------------------------------
n.b these were my initial thoughts. I took a different route after more
investigation.
I think that:
# Java client - AMQSession#registerConsumer should be changed so that if a BURL
specifies the the no-name exchange (that is amqd.getExchangeName() yields ""),
the code should omit the isBound/bindQueue steps. The no-name exchange is not
allowed to accept arbitrary bindings so the client should not try to add them.
# Java client - AMQSession add a system property switch (much like
qpid.declare_queues/qpid.declare_exchanges) that allows the bind queue
behaviour to be turned off.
# Java Broker - There is no guidance in the AMQP spec (0-9 or 0-9-1) as to
whether the exchange.bound (qpid specific extension) should allow queries
against the no-name exchange. In order to maximise compatibility between
different Qpid Broker/Clients, I think ExchangeBoundHandler should be changed
to interpret a null exchange argument as signifying the no-name exchange and
return a bound-ok response accordingly.
was (Author: k-wall):
I think that:
# Java client - AMQSession#registerConsumer should be changed so that if a BURL
specifies the the no-name exchange (that is amqd.getExchangeName() yields ""),
the code should omit the isBound/bindQueue steps. The no-name exchange is not
allowed to accept arbitrary bindings so the client should not try to add them.
# Java client - AMQSession add a system property switch (much like
qpid.declare_queues/qpid.declare_exchanges) that allows the bind queue
behaviour to be turned off.
# Java Broker - There is no guidance in the AMQP spec (0-9 or 0-9-1) as to
whether the exchange.bound (qpid specific extension) should allow queries
against the no-name exchange. In order to maximise compatibility between
different Qpid Broker/Clients, I think ExchangeBoundHandler should be changed
to interpret a null exchange argument as signifying the no-name exchange and
return a bound-ok response accordingly.
> Creating consumer for Destination specifying the no-name exchange in binding
> url syntax fails against Java Broker.
> ------------------------------------------------------------------------------------------------------------------
>
> Key: QPID-5420
> URL: https://issues.apache.org/jira/browse/QPID-5420
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker, Java Client
> Affects Versions: 0.24, 0.26, 0.27
> Reporter: Keith Wall
> Attachments:
> 0001-QPID-5420-Restore-ability-to-consume-using-BURLs-spe.patch
>
>
> If when using the Java Broker, I try to consume from a Destination specified
> by a binding url, where the exchange part is empty (signifying the no-name
> exchange)
> {noformat}
> destination.sub1 = direct:////sub1?durable='true'
> {noformat}
> , then I see an exception:
> On the client I see the following as the Java Broker closes the connection:
> {noformat}
> org.apache.qpid.AMQDisconnectedException: Server closed connection and
> reconnection not permitted.
> {noformat}
> On the broker, I see the following logged:
> {noformat}
> 2013-12-13 10:05:43,602 ERROR [IoReceiver - /127.0.0.1:49532]
> (v0_8.AMQProtocolEngine) - Unexpected exception while processing frame.
> Closing connection.
> org.apache.qpid.AMQException: Exchange exchange must not be null
> at
> org.apache.qpid.server.protocol.v0_8.handler.ExchangeBoundHandler.methodReceived(ExchangeBoundHandler.java:89)
> at
> org.apache.qpid.server.protocol.v0_8.handler.ServerMethodDispatcherImpl.dispatchExchangeBound(ServerMethodDispatcherImpl.java:458)
> at
> org.apache.qpid.framing.amqp_0_9.ExchangeBoundBodyImpl.execute(ExchangeBoundBodyImpl.java:130)
> at
> org.apache.qpid.server.protocol.v0_8.state.AMQStateManager.methodReceived(AMQStateManager.java:120)
> at
> org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine.methodFrameReceived(AMQProtocolEngine.java:578)
> at
> org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:97)
> at
> org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine.frameReceived(AMQProtocolEngine.java:442)
> at
> org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:365)
> at
> org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine.received(AMQProtocolEngine.java:286)
> at
> org.apache.qpid.server.protocol.v0_8.AMQProtocolEngine.received(AMQProtocolEngine.java:104)
> at
> org.apache.qpid.server.protocol.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:131)
> at
> org.apache.qpid.server.protocol.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:47)
> at
> org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:161)
> at java.lang.Thread.run(Thread.java:744)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]