When creating an AMQP map body, using
std::map<proton::value, proton::value> map;
to represent the map, and once its values have been set,
proton::message msg;
msg.body(map);
is a convenient way to set the message body. However, in practice, I am
finding this approach has one problem - I cannot guarantee the key/value
ordering within the map.
On the receiving end, if I don't know the map keys in advance, I need to
use a similar approach:
std::map<proton::value, proton::value> map;
proton::get(msg.body(), map);
which puts the map into a std::map where I can iterate through keys,
etc. But as soon as I do this, I have lost the ordering guarantees of
the original message, as the map will iterate through the keys in an
internal order unrelated to the message ordering.
What is the correct way to both set a proton::value as a map in such a
way that the ordering is preserved when I both set the values and read
them afterward without knowledge of the keys?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]