Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Support batch index acknowledgment #151

Merged

Commits on Dec 20, 2022

  1. Support batch index acknowledgment

    Fixes apache#87
    
    ### Modifications
    
    - Add an consumer configuration `setBatchIndexAckEnabled` to enable the
      batch index ACK. When it's enabled, passing the original `MessageId`
      instead of the `MessageIdImpl` that trunks the batch index to the ACK
      grouping tracker.
    - Since now a `BatchedMessageIdImpl` could be accepted in the ACK
      grouping tracker, fix the compare logic.
    - Support passing a `BitSet` in `Commands::newAck` and get the internal
      `BitSet` from `MessageId` in `Commands::newMultiMessageAck`.
    - Skip the acknowledged batch indexes when receiving batched messages in
      `ConsumerImpl::receiveIndividualMessagesFromBatch`.
    
    ### Verifications
    
    Modify `BitSetTest.testSet` to verify the `BitSet::get` method added in
    this commit.
    
    Add `AcknowledgeTest.testBatchIndexAck` to test batch index ACK for all
    types of acknowledgment:
    - Individual ACK for a single message
    - Individual ACK for a list of messages
    - Cumulative ACK
    
    Add `AcknowledgeTest.testMixedCumulativeAck` to test the new compare
    logic between `BatchedMessageIdImpl` and `MessageIdImpl` works for
    cumulative ACK.
    BewareMyPower committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    a21ebe0 View commit details
    Browse the repository at this point in the history