ActiveMQ
  1. ActiveMQ
  2. AMQ-1874

Added additional Stomp SUBSCRIBE ack mode for acknowledging out-of-order individual message-IDs

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.0
    • Component/s: Transport
    • Labels:
      None
    • Environment:

      Ubuntu Hardy 8.04.1, Linux ig-dexter 2.6.24-20-generic #1 SMP Mon Jul 28 13:49:52 UTC 2008 i686 GNU/Linux

    • Patch Info:
      Patch Available

      Description

      Current Behavior:

      Given that a Stomp client SUBSCRIBEs to a queue with the ack mode set to 'client';

      Scenario 1:
      Some producer send messages and the Stomp Subscriber receives the ff. messages in order:
      Msg1
      Msg2
      Msg3

      ACK Msg1 will acknowledge just Msg1. This is a simple and obvious behavior.
      ACK Msg2, ACK Msg3 should behave normal.

      ====

      Scenario 2:
      Some producer send messages and the Stomp Subscriber receives the ff. messages in order:
      Msg1
      Msg2
      Msg3

      Trying to do an ACK Msg2 will acknowledge both Msg1 and Msg2. Any attempt to ACK Msg1 will result in an Unexpected ACK error frame.
      ACK Msg3 will succeed.

      ====

      Scenario 3:
      Again, some producer send messages and the Stomp Subscriber receives the ff. messages in order:
      Msg1
      Msg2
      Msg3

      Trying to ACK Msg3 will acknowledge ALL messages at once. ACK Msg2 or Msg 1 will raise an exception if attempted.

      ====

      The Stomp specs at http://stomp.codehaus.org/Protocol does not detail the ack behavior nor does it recommend or hint anything.

      Proposed Patch:

      Introduce a new ack mode in Stomp SUBSCRIBE header:

      In the attached patch, the chosen header is called 'client-individual'; to reflect that ACKs are still client initiated PLUS "individual" to
      declare that the client intends to acknowledge individual messages by message-id, not in batches as with simple 'client' ack mode.

      Kindly suggest a another header name if you can think of a more appropriate one.

      References:

      https://issues.apache.org/activemq/browse/AMQ-1732

      Thank you.

      ===========
      Dexter Tad-y

        Activity

        Hide
        Rob Davies added a comment -

        Patch applied in SVN revision 692183

        Show
        Rob Davies added a comment - Patch applied in SVN revision 692183

          People

          • Assignee:
            Rob Davies
            Reporter:
            Dexter Tad-y
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 216h
              216h
              Remaining:
              Remaining Estimate - 216h
              216h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development