[ 
https://issues.apache.org/jira/browse/QPID-6547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14584997#comment-14584997
 ] 

Keith Wall commented on QPID-6547:
----------------------------------

I think changes made by QPID-4897 to AMQSession#registerConsumer mean that the 
client, in its default configuration (qpid.declare_queues true), won't attempt 
to make the binding to the default exchange, because the queue would have just 
been created and therefore the org.apache.qpid.client.AMQSession#isBound will 
return true and it won't go on to call 
org.apache.qpid.client.AMQSession#bindQueue().  I suspect that the user may 
have been using an old client (perhaps circa 0.18).

To avoid the problem if the case where qpid.declare_queues is overridden to be 
false, the expression at AMQSesion.java:220 should ensure that the exchange in 
question is not the default (anonymous) exchange.

Now turning to the second part of this JIRA.  The current BURL parsing 
implementation accepts addresses of the form '/a/b/c/d' which is taken to mean 
a queue with name '/a/b/c/d', a routing key '/a/b/c/d' and  binding between the 
default exchange with the binding key '/a/b/c/d'.  The parser accepts these 
owing to the alternate paths through BindingURLParser#extractExchangeClass.  
This functionality seems to be longstanding and goes back at least until 
QPID-814 (M4) and seems to have been added in order to support the parsing of 
queue names such as IBMPerfQueue1?durable='true'.

I think we should change the BURL parser to reject such address by removing the 
two alternate paths in BindingURLParser#extractExchangeClass and strengthening 
the parser to insist that the URL includes it hierarchy prefix (i.e. //).   
This change would be breaking for users who have JNDI declarations such as 
destination.queue = BURL:/a/b/c/d or  destination.queue = BURL:IBMPerfQueue1.  
It would be no change the behaviour for users using 
Session#createQueue("IBMPerfQueue1"), as this would continue to give an queue 
bound to amq.direct.  These changes would not affect ADDRs.

Thoughts?

> [Java Client] Client should not attempt to make explicit bindings against the 
> default exchange
> ----------------------------------------------------------------------------------------------
>
>                 Key: QPID-6547
>                 URL: https://issues.apache.org/jira/browse/QPID-6547
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>            Reporter: Rob Godfrey
>
> With a default address mode of BURL, an address string like "/a/b/c/d" is 
> treated as if it is an attempt to bind an address to the default (no-name) 
> exchange.  
> Attempting to parse such addresses as BURLs should fail.  The client should 
> stop any attempt to create explicit bindings to the default exchange.  
> Attempts to use the default exchange for topics are probably dubious and 
> should maybe generate a warning.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to