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 09:12:15 UTC
[camel] branch camel-3.20.x 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 camel-3.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.20.x by this push:
new fff894a1fff CAMEL-18985: Updated `SyncCommitManager` to perform offsets auto-commit of the last `poll()` only if the auto-commit is enabled in the configuration.
fff894a1fff is described below
commit fff894a1fffd27a16dc441aefd1cc8a957fd95af
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