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

Darryl L. Pierce commented on QPID-4835:
----------------------------------------

This doesn't appear to be an issue with the Ruby client, but rather with the 
Java/JMS codebase. I was able to use spout.rb and drain.rb to send and read 
messages with properties, and also the spout and drain C++ examples, 
interchangeable; i.e., C++ spout -> Ruby drain.rb, Ruby spout.rb -> C++ drain, 
Ruby spout.rb -> drain.rb, C++ spout -> drain

But when I used either the C++ spout or Ruby spout examples and then attempted 
to use the Java Drain example, Java failed for either spout example to read any 
properties.

== TESTING ==

>From C++ to Ruby

C++ spout:

mcpierce@mcpierce-laptop:cmake 
(QPID-4835-JMS-client-is-unable-to-read-app-headers) $ 
./examples/messaging/spout "my-queue;{create:always}" -P foo=bar

Ruby drain.rb:

mcpierce@mcpierce-laptop:examples 
(QPID-4835-JMS-client-is-unable-to-read-app-headers) $ ruby -I ../lib drain.rb 
"my-queue"
Message(properties={foo:bar, spout-id:78a019a9-aa2a-436a-9332-62fec8a1464f:0, 
x-amqp-0-10.routing-key:my-queue}, content='')


>From Ruby to C++

Ruby spout.rb:

mcpierce@mcpierce-laptop:examples 
(QPID-4835-JMS-client-is-unable-to-read-app-headers) $ ruby -I ../lib spout.rb 
-P farke=berry "my-queue;{create:always}"


C++ drain:

mcpierce@mcpierce-laptop:cmake 
(QPID-4835-JMS-client-is-unable-to-read-app-headers) $ 
./examples/messaging/drain "my-queue"
Message(properties={farke:berry, x-amqp-0-10.routing-key:my-queue}, content='')

>From C++ to Java

C++ spout:

mcpierce@mcpierce-laptop:cmake 
(QPID-4835-JMS-client-is-unable-to-read-app-headers) $ 
./examples/messaging/spout "my-queue;{create:always}" -P wrinkle=time


Java Drain:

mcpierce@mcpierce-laptop:java 
(QPID-4835-JMS-client-is-unable-to-read-app-headers) $ java -classpath 
build/scratch/client/example/classes/:lib/required/geronimo-jms_1.1_spec-1.0.jar:build/scratch/client/classes/:build/scratch/common/classes/:build/lib/slf4j-log4j12-1.6.4.jar:build/lib/slf4j-api-1.6.4.jar:build/lib/log4j-1.2.16.jar
 org.apache.qpid.example.Drain "my-queue" | grep Properties
log4j:WARN No appenders could be found for logger 
(org.apache.qpid.client.AMQConnection).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
info.
Properties:

                
> JMS client is unable to read the application headers of messages sent by the 
> ruby clients
> -----------------------------------------------------------------------------------------
>
>                 Key: QPID-4835
>                 URL: https://issues.apache.org/jira/browse/QPID-4835
>             Project: Qpid
>          Issue Type: Bug
>          Components: Ruby Client
>    Affects Versions: 0.20
>            Reporter: Petr Matousek
>            Assignee: Darryl L. Pierce
>
> I was unable to read the application headers of messages sent by the ruby 
> example client (spout) using the JMS example client.
> ie.
> # cd /usr/lib/ruby/gems/1.8/gems/qpid_messaging-0.20.2/examples
> # ruby spout.rb -P foo=bar q
> # cd /usr/share/doc/qpid-java-0.22/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 can read application headers of messages sent by c++/python.
> packages used:
> ruby gem: qpid_messaging-0.20.2
> java Drain example from qpid-0.22

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to