Description of problem: I was unable to read the application headers of messages sent by the perl example client using the JMS example client. ie. # cd /usr/share/doc/perl-qpid-0.18/examples # perl spout.pl -P foo=bar "q;{create:always}" # cd /usr/share/doc/qpid-java-0.18/examples/ # ./run_example.sh org.apache.qpid.example.Drain q | grep Properties Properties:<NONE> Properties of the received message shall list 'foo = bar'. note: JMS client is able to read properly the application headers of messages sent by c++/python clients. Version-Release number of selected component (if applicable): perl-qpid-0.18-2 qpid-java-*-0.18-7 How reproducible: 100% Steps to Reproduce: 1. ruby spout.rb -P foo=bar "q;{create:always}" 2. ./run_example.sh org.apache.qpid.example.Drain q 3. The properties list is empty Actual results: Unable to read the app. headers of messages sent by perl client using the JMS client. Expected results: The JMS client properly reads the app. headers of messages sent by perl client Additional info:
(In reply to comment #0) > Steps to Reproduce: > 1. ruby spout.rb -P foo=bar "q;{create:always}" > 2. ./run_example.sh org.apache.qpid.example.Drain q > 3. The properties list is empty The above steps are calling the Ruby examples and not the Perl examples. In doing the same thing with the Perl spout example I was able to read the properties using the Perl drain example as well as the Ruby drain example. But it seems that the Ruby spout example, which was used above, has a bug that was not correctly setting properties from the command. Once that bug was fixed, properties passed in the from the command line are properly sent.
This fix for this is committed upstream: http://svn.apache.org/viewvc?view=revision&revision=1482597
(In reply to comment #1) > (In reply to comment #0) > > Steps to Reproduce: > > 1. ruby spout.rb -P foo=bar "q;{create:always}" > > 2. ./run_example.sh org.apache.qpid.example.Drain q > > 3. The properties list is empty > > The above steps are calling the Ruby examples and not the Perl examples. > > In doing the same thing with the Perl spout example I was able to read the > properties using the Perl drain example as well as the Ruby drain example. > > But it seems that the Ruby spout example, which was used above, has a bug > that was not correctly setting properties from the command. > > Once that bug was fixed, properties passed in the from the command line are > properly sent. Yes, I made a mistake by reporting this bug (I was reporting the same bug for ruby client at the same time), Naturally the step 1 of the reproducer scenario shall use the perl spout example: - 1. ruby spout.rb -P foo=bar "q;{create:always}" + 1. perl spout.pl -P foo=bar "q;{create:always}" BUT there is no issue in sending/reading properties (perl|ruby)->(perl|ruby), it's working properly. The issue here is with (perl|ruby)-> JMS client. When users sends a message using the spout client and set some properties, the properties can't be read with the JMS drain example. Which precisely shows the commands in the description of the comment 1. ie. # cd /usr/share/doc/perl-qpid-0.18/examples # perl spout.pl -P foo=bar "q;{create:always}" # cd /usr/share/doc/qpid-java-0.18/examples/ # ./run_example.sh org.apache.qpid.example.Drain q | grep Properties Properties:<NONE> note: JMS client is able to read properly the application headers of messages sent by c++/python clients. Does the fix mentioned in comment 2 fix this issue?
(In reply to comment #3) > (In reply to comment #1) > > (In reply to comment #0) > > > Steps to Reproduce: > > > 1. ruby spout.rb -P foo=bar "q;{create:always}" > > > 2. ./run_example.sh org.apache.qpid.example.Drain q > > > 3. The properties list is empty > > > > The above steps are calling the Ruby examples and not the Perl examples. > > > > In doing the same thing with the Perl spout example I was able to read the > > properties using the Perl drain example as well as the Ruby drain example. > > > > But it seems that the Ruby spout example, which was used above, has a bug > > that was not correctly setting properties from the command. > > > > Once that bug was fixed, properties passed in the from the command line are > > properly sent. > > Yes, I made a mistake by reporting this bug (I was reporting the same bug > for ruby client at the same time), Naturally the step 1 of the reproducer > scenario shall use the perl spout example: > > - 1. ruby spout.rb -P foo=bar "q;{create:always}" > + 1. perl spout.pl -P foo=bar "q;{create:always}" There was a bug in the perl spout.pl file that produced a similar problem that I fixed up stream in this commit; http://svn.apache.org/viewvc?view=revision&revision=1482598 > BUT there is no issue in sending/reading properties > (perl|ruby)->(perl|ruby), it's working properly. The issue here is with > (perl|ruby)-> JMS client. > > When users sends a message using the spout client and set some properties, > the properties can't be read with the JMS drain example. Which precisely > shows the commands in the description of the comment 1. > > ie. > # cd /usr/share/doc/perl-qpid-0.18/examples > # perl spout.pl -P foo=bar "q;{create:always}" > # cd /usr/share/doc/qpid-java-0.18/examples/ > # ./run_example.sh org.apache.qpid.example.Drain q | grep Properties > Properties:<NONE> > > note: JMS client is able to read properly the application headers of > messages sent by c++/python clients. > > Does the fix mentioned in comment 2 fix this issue? The subsequent commit upstream fixes Perl.
(In reply to comment #4) > The subsequent commit upstream fixes Perl. I need to quickly clarify this one. The "subsequent" commit? Does that refer to a commit not already mentioned here, or does that refer to 1482598?
(In reply to comment #5) > (In reply to comment #4) > > The subsequent commit upstream fixes Perl. > > I need to quickly clarify this one. The "subsequent" commit? Does that > refer to a commit not already mentioned here, or does that refer to 1482598? It refers to 1482598.
Setting back to assigned. The java client is not picking up the message properties that are set by the perl client. On rhel 6.4 64 rpm -qa | egrep qpid-java\|perl-qpid\|python-qpid qpid-java-client-0.22-5.el6.noarch python-qpid-qmf-0.22-7.el6.x86_64 qpid-java-common-0.22-5.el6.noarch qpid-java-example-0.22-5.el6.noarch perl-qpid-0.22-5.el6.x86_64 python-qpid-0.22-4.el6.noarch as root qpid-config add queue q cd /usr/share/doc/perl-qpid-0.22/examples ./spout.pl -P foo=bar --content "perl message" q cd /usr/share/doc/qpid-java-0.22/examples ./run_example.sh org.apache.qpid.example.Drain q {} ------------- Msg ------------- Body: perl message JMS Correlation ID: JMS timestamp: 0 JMS expiration: 0 JMS priority: 4 JMS delivery mode: 2 JMS reply to: null JMS Redelivered: false JMS Destination: 'q'/None; None JMS Type: null JMS MessageID: null JMS Content-Type: text/plain AMQ message number: 3 Properties:<NONE> ------------------------------- It appears the java client can't see the properties in the perl message. However, if I spout with perl and drain with python, the properties are there. cd /usr/share/doc/perl-qpid-0.22/examples ./spout.pl -P foo=bar --content "perl message" q cd /usr/share/doc/python-qpid-0.22/example/api ./drain q Message(user_id='', correlation_id='', properties={'x-amqp-0-10.routing-key': u'q', u'foo': 'bar'}, content=u'perl message')
You need to set the encoding to "utf8" for it to be encoded as a String on the wire. Otherwise it will be sent as vbin. Unless it's encoded as a String the java client will not interpret it as a String.
This is fixed upstream in r1512482: http://svn.apache.org/viewvc?view=revision&revision=1512482