Description of problem: The value of toString() on the JMS Destination of a message being sent is different from to the toString() value of JMS Destination of the same message on the receiver side. Ex for clients using the BURL syntax. Sender side The JMSDestination on the sent message is “direct://amq.direct//testQueue?routingkey='key1'” Receiver side The JMSDestination on the recvd message is “direct://amq.direct/key1/key1?routingkey='key1'” Ex for client using the ADDR syntax. Sender side JMS Destination: 'amq.direct'/'test'; None Receiver side JMS Destination: direct://amq.direct/test/test?routingkey='test' How reproducible: Always Steps to Reproduce: 1. Use spout to send a message and observe the JMS Destination printed on the screen. 2. Use drain to receive that message and observe the same. 3. Note that they are represented differently. Actual results: The toString representations are different. (However they contain the correct exchange and routing key information). Expected results: The toString representations should be the same.
This issue is tracked in upstream via https://issues.apache.org/jira/browse/QPID-3466 A fix has been committed upstream, details as follows, http://svn.apache.org/viewvc?view=rev&rev=1165148
We discover problem with the fix. For ADDR syntax toString() representation of JMSDestination of received message is correctly same as sender's. But for BURL syntax it is not. previous results (qpid-java-*-0.10-6): ..summary BURL ...SEND: direct://amq.direct/bz704596/test?routingkey='bz704596' ...RECV: direct://amq.direct/bz704596/bz704596?routingkey='bz704596' ..summary ADDR ...SEND: 'amq.direct'/'bz704596' ...RECV: direct://amq.direct/bz704596/bz704596?routingkey='bz704596' current results (qpid-java-*-0.10-7): ..summary BURL ...SEND: direct://amq.direct/bz704596/test?routingkey='bz704596' ...RECV: 'amq.direct'/'bz704596' ..summary ADDR ...SEND: 'amq.direct'/'bz704596' ...RECV: 'amq.direct'/'bz704596'
This is bcos the the JMSDestination being sent over the wire does not contain any information about the syntax. So on the senders side it's formatted according to the default destination syntax. This is why you see the BURL also being formatted as a ADDR. However if you set the default destination syntax to BURL the exact opposite will happen.
Thanks for clarifying Rajith. I tested it with changin default destination syntax with -Dqpid.dest_syntax=BURL and I discovered problem with BURL. supplied BURL address to Spout: BURL:direct://amq.direct/test?routingkey='bz704596' received address strings from Spout and Drain ...SEND: direct://amq.direct/bz704596/test?routingkey='bz704596' ...RECV: direct://amq.direct/bz704596/bz704596?routingkey='bz704596'
Zdenek, This has been how it's displayed for a long tine in the java client and at this time we will not be doing anything to change it. Please note this patch did not change the existing behaviour of BURL strings were displayed. The BURL form is deprecated we will not be doing any active development on it any longer. Going forward we should test everything with Address strings including JCA as that is the default destination syntax. When we redesign the Java client BURL will be completely dropped. Regards, Rajith
Testing packages: java-1.5.0-ibm-1.5.0.12.4-1jpp.1.el5 java-1.6.0-sun-1.6.0.26-1jpp.1.el5 java-1.6.0-ibm-1.6.0.9.1-1jpp.1.el5 java-1.6.0-openjdk-1.6.0.0-1.23.1.9.10.el5_7 qpid-java-client-0.14-1.el5 qpid-java-client-0.14-1.el6.noarch java-1.6.0-openjdk-1.6.0.0-1.41.1.10.4.el6.i686 java-1.5.0-ibm-1.5.0.12.5-1jpp.1.el6.i686 java-1.6.0-ibm-1.6.0.9.2-1jpp.2.el6.i686 Tested on: RHEL5.7 x86 x86_64 RHEL6.2 x86 x86_64 ADDR representation is correct ADDR->ADDR, BURL->ADDR. BURL representation differs as described in comment #4 and comment #5.
according to testing results (see comment #7) -> VERIFIED please make sure that technical note contains warning about BURL syntax difference.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: The JMSDestination of receiving message defaults to BURL syntax. Consequence: The toString() output of sender and receiver side prints the JMS destination in different syntaxes causing confusion. Fix: The code now use the default syntax of the client when creating the JMSDestination from the incoming message. Result: The toString() of the JMSDestination is now in the same syntax provided the default syntax of the receiver matches the syntax of the JMS Destination used by the sender.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0529.html