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

Rob Godfrey commented on QPID-6701:
-----------------------------------

If you want to assert the existence of the node, shouldn't you be using assert: 
true in the address?  My reading of the code in AMQSession_0_10.isQueueExist 
and AMQSession_0_10.isExchangeExist is that if assert is true then an exception 
will be thrown if the queue/exchange does not exist.

The issue of throwing an exception if there is no queue/exchange, no matter how 
assert is set, is that it precludes the use of addresses within the broker that 
are neither queues nor topics, but which may be sent to / received from.  My 
take on the addressing syntax is that if you don't specify assert then the 
creation of the address shouldn't fail until it is actually unsuccessful in 
attempting to consume (which will occur as the attempt to create a consumer to 
a non-existent address will fail)

> [Regression btw 0.30 - 0.32] If address doesn't resolve an exception is not 
> thrown
> ----------------------------------------------------------------------------------
>
>                 Key: QPID-6701
>                 URL: https://issues.apache.org/jira/browse/QPID-6701
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.32
>            Reporter: Rajith Attapattu
>            Assignee: Keith Wall
>            Priority: Blocker
>             Fix For: qpid-java-6.0
>
>
> If you run "java -cp $CP org.apache.qpid.example.Spout non-existing-node",
> 1. In 0.30 you get an exception with the cause "org.apache.qpid.AMQException: 
> Exception occured while verifying destination"
> 2. In 0.32 no such exception is thrown.
> The issue is in the resolveAddress method in AMQSession class.
> If resolved is false no action is taken. There are a couple issues with this.
> 1. A producer can be created to a non existent queue or exchange.
> 2. Messages being dropped -  While sending to a non existing exchange will 
> result in an error, sending to a non existent queue via an exchange will 
> simply result in messages being dropped. 
> 3. The address will continue to be resolved as there was no error the 
> previous time.
> We should throw an exception if resolved == false.



--
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