2.11. Maps and Lists in Message Content

Many messaging applications need to exchange data across
languages and platforms, using the native datatypes of each
programming language.

The Qpid Messaging API supports map and list in message content.
[9][10]
Specific language support for map and list objects are shown in the following table.

Table 2.5. Map and List Representation in Supported Languages

Language

map

list

Python

dict

list

C++

Variant::Map

Variant::List

Java

MapMessage

.NET

Dictionary<string, object>

Collection<object>

In all languages, messages are encoded using AMQP's portable datatypes.

Tip

Because of the differences in type systems among
languages, the simplest way to provide portable messages is to
rely on maps, lists, strings, 64 bit signed integers, and
doubles for messages that need to be exchanged across languages
and platforms.

2.11.1. Qpid Maps and Lists in Python

In Python, Qpid supports the dict and list types directly in message content. The following code shows how to send these structures in a message: