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

[fix] Fix acknowledge MessageId list does not work when ackGroupingTimeMs is 0 #128

Merged
merged 2 commits into from
Nov 30, 2022

Conversation

BewareMyPower
Copy link
Contributor

Motivation

When ackGroupingTimeMs is 0, AckGroupingTrackerDisabled will be created to acknowledge messages immediately. However, since the addAcknowledgeList method is not implemented in #23, it doesn't work.

Modifications

Implement AckGroupingTrackerDisabled::addAcknowledgeList. Move the protocol version validation from AckGroupingTrackerEnabled to the base class AckGroupingTracker so that the doImmediateAck overload that accepts std::set<MessageId> can be reused.

Add testing params to testAckMsgList and
testAckMsgListWithMultiConsumer so that various ackGroupingTimeMs can be verified.

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

…meMs is 0

### Motivation

When `ackGroupingTimeMs` is 0, `AckGroupingTrackerDisabled` will be
created to acknowledge messages immediately. However, since the
`addAcknowledgeList` method is not implemented in #23, it doesn't work.

### Modifications

Implement `AckGroupingTrackerDisabled::addAcknowledgeList`. Move the
protocol version validation from `AckGroupingTrackerEnabled` to the base
class `AckGroupingTracker` so that the `doImmediateAck` overload that
accepts `std::set<MessageId>` can be reused.

Add testing params to `testAckMsgList` and
`testAckMsgListWithMultiConsumer` so that various `ackGroupingTimeMs`
can be verified.
@BewareMyPower BewareMyPower self-assigned this Nov 29, 2022
@BewareMyPower BewareMyPower added the bug Something isn't working label Nov 29, 2022
@BewareMyPower BewareMyPower added this to the 3.1.0 milestone Nov 29, 2022
@BewareMyPower
Copy link
Contributor Author

@RobertIndie Please also include this PR in 3.1.0 since the VOTE of candidate-2 is not present yet.

@BewareMyPower BewareMyPower merged commit 88d1f20 into apache:main Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants