You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/04/26 10:59:38 UTC
[camel] branch main updated: CAMEL-18985: Updated `SyncCommitManager` to perform offsets auto-commit of the last `poll()` only if the auto-commit is enabled in the configuration.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 40bfa41683b CAMEL-18985: Updated `SyncCommitManager` to perform offsets auto-commit of the last `poll()` only if the auto-commit is enabled in the configuration.
40bfa41683b is described below
commit 40bfa41683be184df1e655ce1f64103a7f81ab12
Author: oleg_pershai <Ol...@epam.com>
AuthorDate: Tue Apr 25 21:36:52 2023 +0100
CAMEL-18985: Updated `SyncCommitManager` to perform offsets auto-commit of the last `poll()` only if the auto-commit is enabled in the configuration.
---
.../apache/camel/component/kafka/consumer/SyncCommitManager.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/consumer/SyncCommitManager.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/consumer/SyncCommitManager.java
index a494a8b10a6..9850e45d156 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/consumer/SyncCommitManager.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/consumer/SyncCommitManager.java
@@ -46,8 +46,10 @@ public class SyncCommitManager extends AbstractCommitManager {
@Override
public void commit() {
- LOG.info("Auto commitSync {} from {}", threadId, printableTopic);
- consumer.commitSync();
+ if (kafkaConsumer.getEndpoint().getConfiguration().isAutoCommitEnable()) {
+ LOG.info("Auto commitSync {} from {}", threadId, printableTopic);
+ consumer.commitSync();
+ }
}
@Override