Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.18.0
-
None
-
Unknown
-
Regression
Description
Reproducing:
- Configure camel kafka consumer with with "breakOnFirstError" = "true"
- Produce a series of records to kafka record consumed by application
- Ensure offset is commited
- Produce more records
- Trigger an error when processing one of the records
Expected behavior:
- Application should only reconsume records after the last committed offset
Actual behavior:
- Application reconsumes all records on topic
Whether the erroneous behavior is triggered seem to be dependent on the offset the failing exchange has internally in the series of records in the poll.
I've created a project on github with a failing test that reproduces the issue: https://github.com/espeandr/camel-kafka-incorrectly-reconsumes-entire-topic-demo. I haven't been able to find a pattern to which "message offset" in the poll causes the error. In the test I've reproduced the error by forcing a max poll size as this simplifies the test setup. The issue is also reproducible without overriding maxPollSize.
I suspect that offset = 0 is committed when breaking out in the erroneous cases.
Attachments
Issue Links
- causes
-
CAMEL-20089 camel-kafka: make breakOnFirstError more flexible
- Resolved
- relates to
-
CAMEL-20044 camel-kafka - On rejoining consumer group Camel can set offset incorrectly causing messages to be replayed
- Resolved
- links to