[rabbitmq-discuss] Serialized Java Objects in Message bodies not supported by RabbitMQ??

Jerry Kuch jerryk at vmware.com
Fri Mar 2 05:11:42 GMT 2012


Hi, Ashutosh:

You can put any bytes you want into an AMQP message payload,
you'll just have to handle the encoding yourself in the usual
Java serialization ways.  Be warned though, that serializing POJOs
is going to put restrictions on the the recipients of your message 
can be, i.e. they're also going to need to be in Java, with the 
appropriate stuff versions of the appropriate stuff on their 
classpaths, to be able to make sense out of what you're sending 
them if you plan to deserialize them into Java objects.

You might find the JSON solution you suggest gives you something 
that's a bit more friendly in polyglot systems, and leave your 
application with more future flexibility...

Jerry

----- Original Message -----
From: "Ashutosh Mathur" <amathur.q at gmail.com>
To: rabbitmq-discuss at lists.rabbitmq.com
Sent: Thursday, March 1, 2012 9:00:36 PM
Subject: [rabbitmq-discuss] Serialized Java Objects in Message bodies not	supported by RabbitMQ??


Hi, 

RabbitMQ doesn't support Serialized Java Objects in Message bodies.Is that true? In JMS,it is done by "CreateObjectMessage()" method. Is there any function in AMQP which has same/similar functionality.? 
One possible solution for above may be to convert data into JSON strings and send within the message.will that work? 
Thanks in advance. 

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list