[rabbitmq-discuss] Sending objects across different clients
david at rabbitmq.com
Fri Jul 30 14:54:43 BST 2010
Andreas Jung <lists at zopyx.com> writes:
> Abhishek K wrote:
>> I need to send Objects (usually maps) into an exchange and a client will
>> consume them. Clients can be in different languages. What are the ways
>> of doing it. Am I missing some thing here?
> You are missing nothing - RabbitMQ is not about object serialization.
> This is a topic that must be handled inside your application (producer
> and consumer). The serialization approach depends on you needs and
> technology. If you can: use XML as serialization format. Language
> dependent serialization could look like this: Python uses a 'pickle'
> format for serializing objects. Python bindings for RabbitMQ like Carrot
> provide this level of serialization (besides others) out of the
> box...but as said: object serialization is out of scope or RabbitMQ.
Andreas is correct - you'll need to choose a serialization format based
on your requirements.
With that said, if interop between different languages is a requirement,
then the list of candidates is not huge. If you are using dynamic
languages (e.g. Ruby, Python), JSON works well. For more static
languages (e.g. Java, C#), XML might give you a richer toolset. If
message size is more of a concern than human readability of messages,
then consider language-independent binary serialization technologies,
such as protobufs, thrift, and fudge.
Staff Engineer, RabbitMQ
SpringSource, a division of VMware
More information about the rabbitmq-discuss