Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 704596 - The toString() representation of the JMSDestination of a received message is different from the toString() representation on the sender side.
The toString() representation of the JMSDestination of a received message is ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java (Show other bugs)
Development
Unspecified Unspecified
low Severity low
: 2.1.2
: ---
Assigned To: Rajith Attapattu
Zdenek Kraus
:
Depends On:
Blocks: 783492
  Show dependency treegraph
 
Reported: 2011-05-13 13:25 EDT by Rajith Attapattu
Modified: 2012-04-30 13:51 EDT (History)
8 users (show)

See Also:
Fixed In Version: qpid-java-0.14-1.el5
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-30 13:51:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0529 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Messaging 2.1 security and enhancement update 2012-04-30 17:48:25 EDT

  None (edit)
Description Rajith Attapattu 2011-05-13 13:25:41 EDT
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.
Comment 1 Rajith Attapattu 2011-09-04 23:28:42 EDT
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
Comment 2 Zdenek Kraus 2011-09-07 09:28:14 EDT
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'
Comment 3 Rajith Attapattu 2011-09-09 08:52:42 EDT
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.
Comment 4 Zdenek Kraus 2011-09-12 06:00:07 EDT
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'
Comment 5 Rajith Attapattu 2011-09-12 17:29:50 EDT
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
Comment 7 Zdenek Kraus 2012-01-13 05:11:00 EST
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.
Comment 8 Zdenek Kraus 2012-01-24 04:28:20 EST
according to testing results (see comment #7) -> VERIFIED

please make sure that technical note contains warning about BURL syntax difference.
Comment 9 Rajith Attapattu 2012-03-12 11:19:48 EDT
    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.
Comment 10 errata-xmlrpc 2012-04-30 13:51:14 EDT
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

Note You need to log in before you can comment on or make changes to this bug.