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 an option so that KafkaMessageListenerContainer.stop() takes effect after the current record instead of the current batch #1672
Comments
You asked the same question on StackOverflow already: https://stackoverflow.com/questions/65664927/kafkamessagelistenercontainer-stop-is-not-stopping-consumption-of-messages-in. Just 4 hours ago. We will come back to you over there. |
Regardless of this behavior, you should not call |
Resolves spring-projects#1672 Previously (and still, by default), stopping the listener container does not take effect until the records from the previous poll are all processed. Add an option to stop after the current record, instead. **cherry-pick to 2.6.x, 1.5.x**
Resolves #1672 Previously (and still, by default), stopping the listener container does not take effect until the records from the previous poll are all processed. Add an option to stop after the current record, instead. **cherry-pick to 2.6.x, 1.5.x**
Resolves #1672 Previously (and still, by default), stopping the listener container does not take effect until the records from the previous poll are all processed. Add an option to stop after the current record, instead. **cherry-pick to 2.6.x, 1.5.x** # Conflicts: # src/reference/asciidoc/whats-new.adoc
Resolves #1672 Previously (and still, by default), stopping the listener container does not take effect until the records from the previous poll are all processed. Add an option to stop after the current record, instead. **cherry-pick to 2.6.x, 1.5.x** # Conflicts: # src/reference/asciidoc/whats-new.adoc # Conflicts: # src/reference/asciidoc/whats-new.adoc
UseCase: Given topic with 100 messages in kafka topic, I want to read messaged from offset 10 to offset 20. I could able to fetch from beginning offset. when i reach end offset, I have written code to stop the container.Even after execution of code, Consumer can consume further messages(from offset 21).It only stops after reading all messages in the topic
Note: I am using spring-kafka latest version(2.6.4). One observation is container stop method is being executed but consumer is not getting closed.And no errors on output
The text was updated successfully, but these errors were encountered: