In AMQP the messages are opaque entities; AMQP does not provide any standard way to encode/decode them.
On the other side, this is not the only protocol; any application can choose its own protocol (XML, Google Protocol Buffers, ASN.1, or proprietary).
In this example we are showing how to use the JSON protocol to encode and decode message bodies. We are using a publisher written in Java (
Chapter01/Recipe04/Java_4/src/rmqexample) and a consumer in Python (