-
Notifications
You must be signed in to change notification settings - Fork 29
Allow SubscribableKafkaMessageSource option of manually commiting offsets #555
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
Comments
Looking at above auto created fix... I dont think the configuration is available from the consumer. A new builder method could be added e.g. like pollTimeout
|
Thanks for opening this issue, and the subsequent pull request, with us, @bradskuse! |
All good @smcvb Thank you for the update, I appreciate you must be pretty busy with a release coming up. Hopefully my understanding of the problem is correct. Once the release is all done and the team is freed up, feel free to ping me any questions. In the meantime I'll push up another change to PR to have option of synchronous vs asynchronous commit (which could be useful for others) |
Sorry for the long wait here, @bradskuse! We've released Axon Framework 5, milestone 1, last Wednesday. |
Thank you for the issue and the pull request, @bradskuse! I have just approved your PR, saw the build turn green, and merged it. I will be releasing this extension right now as well. That way, I can pair it up with some fixes for the Mongo Extension and Axon Framework 4.11. |
Enhancement Description
Currently when using the consumer choice of SubscribableKafkaMessageSource, there is no way to commit offsets pragmatically. It depends on
enable-auto-commit: true
to be set.The problem with this is when a batch of consumer records are processed (lets say a batch size of 50), the batch could fail on the 15th message AND in the background the consumer can commit offsets through to the 50th event. When the consumer then resubscribes the events from 15 - 50 have been missed.
I'm proposing an option to allow FetchEventsTask to manually commit the offsets.
Current Behaviour
When an event throws an exception the consumer can commit the offsets and then miss records.
Wanted Behaviour
Maybe after the processRecords(...) shown below, the offsets could be committed if auto commit is disabled.
Possible Workarounds
I don't think a work-a-round is possible.
The text was updated successfully, but these errors were encountered: