Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-317

Feature Enhancement - API Exposure of underlying references to internal atoms

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.3
    • proton-0.5
    • proton-c
    • None
    • Linux / C implementation

    Description

      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:

      pn_data_rewind (pn_data);
      while (pn_data_next (pn_data))
      {
      pn_atom_t atom = pn_data_get_atom (pn_data);
      if(this_atom_might_be_useful)

      { // Mark this for potential modification later }

      }

      if (changes_are_required_based_on_a_combination_of_circumstances)
      {
      // 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.

      Attachments

        Activity

          People

            rhs Rafael H. Schloming
            fquinn Frank Quinn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: