davsclaus opened a new pull request, #24696: URL: https://github.com/apache/camel/pull/24696
## Summary When `allowManualCommit=true` was used together with a `DefaultKafkaManualCommitFactory` or `DefaultKafkaManualAsyncCommitFactory`, the `CommitManagers` factory selected a `SyncCommitManager` or `AsyncCommitManager` that auto-committed offsets for every processed record — even when the route did not call `KafkaManualCommit.commit()`. This defeated the purpose of manual commit and could cause silent message loss (at-most-once instead of at-least-once). The root cause is that the CAMEL-17802 rework (Mar 2022) coupled two unrelated concerns: - **Factory** → controls how the route's explicit `commit()` call executes (sync vs async) - **CommitManager** → controls whether the framework auto-commits offsets after processing each partition The fix always uses `NoopCommitManager` when `allowManualCommit=true`, regardless of which factory is configured. The factory is still consulted via `AbstractCommitManager.getManualCommit()` to create sync or async manual commit objects — that path is unaffected. Part of [CAMEL-23997](https://issues.apache.org/jira/browse/CAMEL-23997) (finding #7). ## Changes - `CommitManagers.createCommitManager()`: simplified the `allowManualCommit` branch to always return `NoopCommitManager` - Added `CommitManagersTest` with 6 tests covering all commit manager selection paths - Added upgrade guide entry documenting the behavior change _Claude Code on behalf of davsclaus_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
