-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #894 ### Modifications Add an `EnableBatchIndexAcknowledgment` to specify whether batch index ACK is enabled. Since this feature requires the conversion between a bit set and its underlying long array, which is similar to Java's `BitSet`, this commit introduces github.com/bits-and-blooms/bitset dependency to replace the `big.Int` based implementation of the bit set. Add a `BatchSize()` method to `MessageId` to indicate the size of the `ack_set` field. When the batch index ACK happens, convert the `[]uint64` to the `[]int64` as the `ack_set` field in `CommandAck`. When receiving messages, convert the `ack_set` field in `CommandMessage` to filter the acknowledged single messages. Remove the duplicated code in `AckID` and `AckIDWithResponse`. ### Verifications `TestBatchIndexAck` is added to cover the case whether `AckWithResponse` is enabled and both individual and cumulative ACK.
- Loading branch information
1 parent
1f3747e
commit 2dfdabd
Showing
12 changed files
with
261 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.