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

[Java Client] Batch version of acknowledgeAsync will return a completed future before individual messages complete #9383

Merged

Conversation

congbobo184
Copy link
Contributor

@congbobo184 congbobo184 commented Jan 31, 2021

Motivation

Fixes #9344

Verifying this change

Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes

Dependencies (does it add or upgrade a dependency): (no)
The public API: (no)
The schema: (no)
The default values of configurations: (no)
The wire protocol: (no)
The rest endpoints: (no)
The admin cli options: (no)
Anything that affects deployment: (no)

@congbobo184
Copy link
Contributor Author

/pulsarbot run-failure-checks

@sijie sijie changed the title [Java Client] Fix issue 9344 [Java Client] Batch version of acknowledgeAsync will return a completed future before individual messages complete Feb 1, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return CompletableFuture.completedFuture(null);
List<MessageId> messageIds = new ArrayList<>();
messages.forEach(message -> messageIds.add(message.getMessageId()));
CompletableFuture<Void> completableFuture = acknowledgeAsync(messageIds);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can save declaring this variable

@jiazhai jiazhai merged commit e006165 into apache:master Feb 3, 2021
Anonymitaet pushed a commit that referenced this pull request Feb 3, 2021
…ed future before individual messages complete (#9383)

Fixes #9344

Verifying this change
Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes
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.

Batch version of acknowledgeAsync will return a completed future before individual messages complete
5 participants