Qpid
  1. Qpid
  2. QPID-3200

Ability to acknowledge all messages up to and including a given message for a Session

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11
    • Component/s: C++ Client
    • Labels:
      None

      Description

      Currently the Session class gives us the ability to acknowledge either a single specified message, or all outstanding messages for the Session. We'd like to be able to acknowledge all messages up to and including a given message in a single method call, to save on round trip times to the broker.

      Our use case.
      1) create receiver with capacity > 0 (e.g. 100)
      2) repeat:
      a) receive message X from queue A
      b) perform business logic
      c) send message X to a broker (could be same broker, could be a different broker)
      3) Every so often, we'd like to acknowledge messages that we're certain have been received by the broker in 2c. We can't use session.acknowledge() because it's possible some messages that we've received in 2a haven't been completed by the broker in 2c. We plan on checking the unsettled count in our sender and using that to determine which messages can be safely acknowledged. It's currently slow to ack each message individually, and we think that being able to invoke session.acknowledgeThrough(messageX) should be faster for us.

        Activity

        Andy Goldstein created issue -
        Gordon Sim made changes -
        Field Original Value New Value
        Assignee Gordon Sim [ gsim ]
        Hide
        Gordon Sim added a comment -

        Review proposed patch at https://reviews.apache.org/r/882/

        Show
        Gordon Sim added a comment - Review proposed patch at https://reviews.apache.org/r/882/
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/882/
        -----------------------------------------------------------

        Review request for qpid.

        Summary
        -------

        This patch adds a new method to the qpid::messaging::Session class in the public API that allows all messages up to a certain point to be acknowledged.

        This addresses bug QPID-3200.
        https://issues.apache.org/jira/browse/QPID-3200

        Diffs


        /trunk/qpid/cpp/include/qpid/messaging/Session.h 1130102
        /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.h 1130102
        /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.cpp 1130102
        /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h 1130102
        /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp 1130102
        /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.h 1130102
        /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp 1133822
        /trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp 1130102

        Diff: https://reviews.apache.org/r/882/diff

        Testing
        -------

        All existing tests pass, new test added to cover the new method.

        Thanks,

        Gordon

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/882/ ----------------------------------------------------------- Review request for qpid. Summary ------- This patch adds a new method to the qpid::messaging::Session class in the public API that allows all messages up to a certain point to be acknowledged. This addresses bug QPID-3200 . https://issues.apache.org/jira/browse/QPID-3200 Diffs /trunk/qpid/cpp/include/qpid/messaging/Session.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.cpp 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp 1133822 /trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp 1130102 Diff: https://reviews.apache.org/r/882/diff Testing ------- All existing tests pass, new test added to cover the new method. Thanks, Gordon
        Hide
        Chuck Rolke added a comment -

        Any change like this to the public interface of course affects the bindings.

        I'll post a patch for the .NET Messaging binding by Monday.

        -Chuck

        Show
        Chuck Rolke added a comment - Any change like this to the public interface of course affects the bindings. I'll post a patch for the .NET Messaging binding by Monday. -Chuck
        Gordon Sim made changes -
        Fix Version/s 0.11 [ 12316272 ]
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/882/#review831
        -----------------------------------------------------------

        Ship it!

        • Alan

        On 2011-06-10 16:27:29, Gordon Sim wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/882/

        -----------------------------------------------------------

        (Updated 2011-06-10 16:27:29)

        Review request for qpid.

        Summary

        -------

        This patch adds a new method to the qpid::messaging::Session class in the public API that allows all messages up to a certain point to be acknowledged.

        This addresses bug QPID-3200.

        https://issues.apache.org/jira/browse/QPID-3200

        Diffs

        -----

        /trunk/qpid/cpp/include/qpid/messaging/Session.h 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.h 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.cpp 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.h 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp 1133822

        /trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp 1130102

        Diff: https://reviews.apache.org/r/882/diff

        Testing

        -------

        All existing tests pass, new test added to cover the new method.

        Thanks,

        Gordon

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/882/#review831 ----------------------------------------------------------- Ship it! Alan On 2011-06-10 16:27:29, Gordon Sim wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/882/ ----------------------------------------------------------- (Updated 2011-06-10 16:27:29) Review request for qpid. Summary ------- This patch adds a new method to the qpid::messaging::Session class in the public API that allows all messages up to a certain point to be acknowledged. This addresses bug QPID-3200 . https://issues.apache.org/jira/browse/QPID-3200 Diffs ----- /trunk/qpid/cpp/include/qpid/messaging/Session.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.cpp 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp 1133822 /trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp 1130102 Diff: https://reviews.apache.org/r/882/diff Testing ------- All existing tests pass, new test added to cover the new method. Thanks, Gordon
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/882/#review832
        -----------------------------------------------------------

        Ship it!

        • Kenneth

        On 2011-06-10 16:27:29, Gordon Sim wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/882/

        -----------------------------------------------------------

        (Updated 2011-06-10 16:27:29)

        Review request for qpid.

        Summary

        -------

        This patch adds a new method to the qpid::messaging::Session class in the public API that allows all messages up to a certain point to be acknowledged.

        This addresses bug QPID-3200.

        https://issues.apache.org/jira/browse/QPID-3200

        Diffs

        -----

        /trunk/qpid/cpp/include/qpid/messaging/Session.h 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.h 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.cpp 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.h 1130102

        /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp 1133822

        /trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp 1130102

        Diff: https://reviews.apache.org/r/882/diff

        Testing

        -------

        All existing tests pass, new test added to cover the new method.

        Thanks,

        Gordon

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/882/#review832 ----------------------------------------------------------- Ship it! Kenneth On 2011-06-10 16:27:29, Gordon Sim wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/882/ ----------------------------------------------------------- (Updated 2011-06-10 16:27:29) Review request for qpid. Summary ------- This patch adds a new method to the qpid::messaging::Session class in the public API that allows all messages up to a certain point to be acknowledged. This addresses bug QPID-3200 . https://issues.apache.org/jira/browse/QPID-3200 Diffs ----- /trunk/qpid/cpp/include/qpid/messaging/Session.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.cpp 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.h 1130102 /trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp 1133822 /trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp 1130102 Diff: https://reviews.apache.org/r/882/diff Testing ------- All existing tests pass, new test added to cover the new method. Thanks, Gordon
        Gordon Sim made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Justin Ross made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Gordon Sim
            Reporter:
            Andy Goldstein
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development