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 2021/11/15 13:16:59 UTC

[camel] branch main updated: CAMEL-17131: camel-kafka - Consumer should not be in reconnect state on startup as this causes to create the kafka consumer twice on startup, which is also causing a JMX duplicate MBean error, and let alone the creation of the consumer again.

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 4879d1e  CAMEL-17131: camel-kafka - Consumer should not be in reconnect state on startup as this causes to create the kafka consumer twice on startup, which is also causing a JMX duplicate MBean error, and let alone the creation of the consumer again.
4879d1e is described below

commit 4879d1ed4172ffa14517184e64b66460d4aaf42d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Nov 13 15:35:29 2021 +0100

    CAMEL-17131: camel-kafka - Consumer should not be in reconnect state on startup as this causes to create the kafka consumer twice on startup, which is also causing a JMX duplicate MBean error, and let alone the creation of the consumer again.
---
 .../main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java
index 0f600a9..c0119f4 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java
@@ -62,7 +62,7 @@ class KafkaFetchRecords implements Runnable {
     private final ConcurrentLinkedQueue<KafkaAsyncManualCommit> asyncCommits = new ConcurrentLinkedQueue<>();
 
     private boolean retry = true;
-    private boolean reconnect = true;
+    private boolean reconnect; // must be false at init
 
     KafkaFetchRecords(KafkaConsumer kafkaConsumer, PollExceptionStrategy pollExceptionStrategy,
                       BridgeExceptionHandlerToErrorHandler bridge, String topicName, Pattern topicPattern, String id,