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 <claus.ib...@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,

Reply via email to