activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Problems in publishing from AMQP-JMS Bridge
Date Mon, 02 Dec 2013 17:45:44 GMT
On 11/29/2013 07:01 AM, xbhanu wrote:
> Hi,
>
> I am publishing simple Object messages from the JMS-AMQP
> bridge(qpid-amqp-1-0-client-jms-0.22.jar) to a Python AMQP client (the SWIG
> proton wrapper from Qpid). The problem is that serializing/deserializing is
> not happening properly.
>
> Basically I am sending a Date() object in a JMSObjectMessage and getting the
> output as
> "\xac\xed\x00\x05sr\x00\x0ejava.util.Datehj\x81\x01KYt\x19\x03\x00\x00xpw\x08\x00\x00\x01B\xa2\x9fRax"
> in AMQP java receiver and
> "\ufffd\ufffdsrjava.util.Datehj\ufffdKYtxpB\ufffd\ufffd\ufffd!x" in AMQP
> python reciever.
> I get a nice output with JMS receiver though.
>
>
> If I use the Java Messenger API to send the Date() Object in an AMQPValue
> then AMQP clients can serialize and deserialize properly.
>
> Do I need to set some extra headers when sending from JMS/AMQP bridge? or
> what is it that needs to be done ?

It looks to me like the qpid-amqp-1-0-client-jms client is serializing 
the java object (in this case a java.util.Date instance) and sending 
that as a binary section in the AMQP 1.0 message.

That won't work if the recipient is not also in java (or at least on a 
jvm). I would suggest you change that to using e.g. a MapMessage or some 
explicit encoding of your own choosing that you know the python based 
application can handle.


Mime
View raw message