Qpid Proton
  1. Qpid Proton
  2. PROTON-439

Support for dynamic reply-to address in Messenger

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5
    • Fix Version/s: 0.7
    • Component/s: proton-c
    • Labels:
      None

      Description

      Messenger has no support for creating dynamic receivers for reply-to addresses. Please refer to the following email thread for prior discussion on the topic.

      http://qpid.2158936.n2.nabble.com/Proton-Messenger-and-the-Request-Response-pattern-tp7586653.html

        Issue Links

          Activity

          Hide
          Ted Ross added a comment - - edited

          Here's a proposed algorithm assuming Ken's suggested "put-request" API:

          put_request(msg):
              conn = lookup_or_create_connection_for_address(msg.address)
              if a reply receiver-link exists for conn
                  rlink = existing_reply_link
              else
                  rlink = create_new_receiver(conn, dynamic=true)
                  subscribe to rlink
              msg.reply_to = rlink.remote_source
              enqueue(msg)
          
          Show
          Ted Ross added a comment - - edited Here's a proposed algorithm assuming Ken's suggested "put-request" API: put_request(msg): conn = lookup_or_create_connection_for_address(msg.address) if a reply receiver-link exists for conn rlink = existing_reply_link else rlink = create_new_receiver(conn, dynamic=true) subscribe to rlink msg.reply_to = rlink.remote_source enqueue(msg)
          Hide
          ASF subversion and git services added a comment -

          Commit 1547022 from rhs@apache.org in branch 'proton/trunk'
          [ https://svn.apache.org/r1547022 ]

          initial stab at PROTON-439

          Show
          ASF subversion and git services added a comment - Commit 1547022 from rhs@apache.org in branch 'proton/trunk' [ https://svn.apache.org/r1547022 ] initial stab at PROTON-439
          Hide
          ASF subversion and git services added a comment -

          Commit 1547025 from rhs@apache.org in branch 'proton/trunk'
          [ https://svn.apache.org/r1547025 ]

          fixes for PROTON-439

          Show
          ASF subversion and git services added a comment - Commit 1547025 from rhs@apache.org in branch 'proton/trunk' [ https://svn.apache.org/r1547025 ] fixes for PROTON-439
          Hide
          Rafael H. Schloming added a comment -

          I've submitted some initial support for this. The details may change, but basically if you subscribe to "hostname/#", messenger will set the source to dynamic. You can access the remote address by querying the subscription object returned from the subscribe method. In C this can be done by using pn_subscription_address(), and in python you can simply use the address attribute of the subscription object. In both cases the query will block until the dynamically created address is available, unless of course the messenger is configured to be non blocking.

          Messenger itself doesn't support dynamically created addresses on the incoming side, so I can't test this directly, however I've successfully tested against the C++ broker.

          Show
          Rafael H. Schloming added a comment - I've submitted some initial support for this. The details may change, but basically if you subscribe to "hostname/#", messenger will set the source to dynamic. You can access the remote address by querying the subscription object returned from the subscribe method. In C this can be done by using pn_subscription_address(), and in python you can simply use the address attribute of the subscription object. In both cases the query will block until the dynamically created address is available, unless of course the messenger is configured to be non blocking. Messenger itself doesn't support dynamically created addresses on the incoming side, so I can't test this directly, however I've successfully tested against the C++ broker.
          Hide
          ASF subversion and git services added a comment -

          Commit 1547063 from rhs@apache.org in branch 'proton/trunk'
          [ https://svn.apache.org/r1547063 ]

          PROTON-439: properly format subscription address

          Show
          ASF subversion and git services added a comment - Commit 1547063 from rhs@apache.org in branch 'proton/trunk' [ https://svn.apache.org/r1547063 ] PROTON-439 : properly format subscription address
          Hide
          ASF subversion and git services added a comment -

          Commit 1547089 from rhs@apache.org in branch 'proton/trunk'
          [ https://svn.apache.org/r1547089 ]

          PROTON-439: don't substitute remode addresses that are already absolute

          Show
          ASF subversion and git services added a comment - Commit 1547089 from rhs@apache.org in branch 'proton/trunk' [ https://svn.apache.org/r1547089 ] PROTON-439 : don't substitute remode addresses that are already absolute
          Hide
          ASF subversion and git services added a comment -

          Commit 1547100 from rhs@apache.org in branch 'proton/trunk'
          [ https://svn.apache.org/r1547100 ]

          PROTON-439: remove spurious slash for absolute addresses

          Show
          ASF subversion and git services added a comment - Commit 1547100 from rhs@apache.org in branch 'proton/trunk' [ https://svn.apache.org/r1547100 ] PROTON-439 : remove spurious slash for absolute addresses
          Hide
          Ted Ross added a comment -

          As of the last commit (1547100), this feature works as I expect it to.

          Show
          Ted Ross added a comment - As of the last commit (1547100), this feature works as I expect it to.
          Hide
          ASF subversion and git services added a comment -

          Commit 1552218 from rhs@apache.org in branch 'proton/trunk'
          [ https://svn.apache.org/r1552218 ]

          fixed braino in PROTON-439

          Show
          ASF subversion and git services added a comment - Commit 1552218 from rhs@apache.org in branch 'proton/trunk' [ https://svn.apache.org/r1552218 ] fixed braino in PROTON-439
          Hide
          Justin Ross added a comment -

          This appears to have no documentation in the python api docs.

          Show
          Justin Ross added a comment - This appears to have no documentation in the python api docs.

            People

            • Assignee:
              Rafael H. Schloming
              Reporter:
              Ted Ross
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development