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

Add receive batch to receiver #359

Merged
merged 4 commits into from
Sep 11, 2023

Conversation

mohamed-gara
Copy link
Contributor

@mohamed-gara mohamed-gara commented Aug 31, 2023

This PR is an implementation to resolve #261. I have chosen the name proposed by @serejke here for the new method in KafkaReceiver.

Actually, in our product I use receive() with the bufferTimeout operator. But it is not the best solution to consume a record batch. With the receiveBatch() method batch consumption will be easier.

@pivotal-cla
Copy link

@mohamed-gara Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@mohamed-gara Thank you for signing the Contributor License Agreement!

Copy link
Contributor

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

Just a couple @since correction.
Otherwise I don't see any problems with this fix.

Thanks

src/main/java/reactor/kafka/receiver/KafkaReceiver.java Outdated Show resolved Hide resolved
src/main/java/reactor/kafka/receiver/KafkaReceiver.java Outdated Show resolved Hide resolved
Copy link
Contributor

@garyrussell garyrussell left a comment

Choose a reason for hiding this comment

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

LGTM; please add some documentation for the receiveBatch method.

https://projectreactor.io/docs/kafka/release/reference/#api-guide-receiver

@garyrussell garyrussell merged commit 9597c93 into reactor:main Sep 11, 2023
2 checks passed
@violetagg violetagg added this to the 1.3.21 milestone Sep 13, 2023
@violetagg violetagg added the type/enhancement A general enhancement label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

receiveAutoAck commits the batch even in case of exception (or Error) while processing
5 participants