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

[Issue 183] [Feat] Support cumulative acknowledge #903

Merged
merged 5 commits into from
Jan 3, 2023

Conversation

Gleiphir2769
Copy link
Contributor

@Gleiphir2769 Gleiphir2769 commented Dec 7, 2022

Master Issue: #183

Motivation

Cumulative acknowledgement is a useful feature. Users can use this feature to ack messages in the stream up to (and including) provided message.

Issue #183 shows more details.

Modifications

  • Add two api AckCumulative and AckIDCumulative for Consumer.
// AckCumulative the reception of all the messages in the stream up to (and including)
// the provided message.
AckCumulative(msg Message) error

// AckIDCumulative the reception of all the messages in the stream up to (and including)
// the provided message, identified by its MessageID
AckIDCumulative(msgID MessageID) error
  • Add the AckCumulative and AckIDCumulative implementation for consumer, multiTopicConsumer, regexConsumer and mockConsumer.

  • Add the unit test TestConsumerNoBatchCumulativeAck TestConsumerBatchCumulativeAck TestCumulativeAckWithResponse for cumulative ack in consumer_test.go.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • The public API: yes

@Gleiphir2769
Copy link
Contributor Author

Hi, @RobertIndie @nodece, could you give a review when you are free? Thanks.

pulsar/consumer.go Outdated Show resolved Hide resolved
@BewareMyPower BewareMyPower added this to the v0.10.0 milestone Jan 3, 2023
@BewareMyPower BewareMyPower merged commit 2377736 into apache:master Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants