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

Robbie Gemmell commented on QPIDJMS-479:
----------------------------------------

Per the spec, JMS does not allow for applications to set JMSDestination 
independently of where the message is being sent. The JMS client stamps 
JMSDestination on send, to the destination it is being sent.

[https://docs.oracle.com/javaee/7/api/javax/jms/Message.html#setJMSDestination-javax.jms.Destination-]
{quote}
This method is for use by JMS providers only to set this field when a message 
is sent. This message cannot be used by clients to configure the destination of 
the message. This method is public to allow a JMS provider to set this field 
when sending a message whose implementation is not its own.
{quote}

> [JMS Client] JMS client breaks AMQP 1.0 specification by always setting the 
> "to" property equal to link address.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: QPIDJMS-479
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-479
>             Project: Qpid JMS
>          Issue Type: Bug
>          Components: qpid-jms-client
>    Affects Versions: 0.46.0, 0.47.0
>            Reporter: Yufei Cai
>            Priority: Major
>
> [https://github.com/apache/qpid-jms/blob/0.47.0/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsSession.java#L859-L890]
>  
> The class JmsSession of Qpid JMS client always calls 
> "Message.setJMSDestination" with the link address before sending the message. 
> This is not specification-conform.
>  
> From AMQP JMS mapping v1.0 section 3.3.2 (Note the final setence: The 
> JMSDestination should be derived from the link address ONLY IF it is not set):
> {quote}to
> This field is mapped to the JMSDestination header of the Message. 
> JMSDestination is defined as being of the JMS Destination type, while the to 
> field of properties requires an address-string. See 5. Destinations for 
> REQUIRED detail regarding how conversion between these types is achieved if 
> the to field of properties was set. If the to field of properties was not set 
> on a received message, the JMSDestination header value SHOULD be derived from 
> the Destination to which the receiving consumer was established.
> {quote}
>  
> From AMQP 1.0 specification section 3.2.4:
> {quote}to         the address of the node the message is destined for
> The to field identifies the node that is the intended destination of the 
> message. On any given transfer this might not be the node at the receiving 
> end of the link.
> {quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to