We're currently creating a pn_message_t and iterating over it using the pn_data_t data type and the various convenience methods surrounding it. This is great for iteration but we were also hoping to have a way to mark a point in the payload for future realignment. I looked at get_message_id() but that always seems to return NULL.
Let's take a pseudo example:
while (pn_data_next (pn_data))
pn_atom_t atom = pn_data_get_atom (pn_data);
// Jump to earlier marker(s)
// put in relevant update(s)
Is there anything we could use for this sort of use case? I want to avoid having to iterate again to find values, and I also want to be able to write functions which don't move (or move, then reset) the internal buffer pointers in proton. If there was something like a get_position() or set_position(), that would be perfect.