You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/06/06 07:25:07 UTC

[camel] 01/02: CAMEL-16689: camel-core - Lazy start producer should re-create in case it failed to create or start the producer

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0bbc100f62029b3c355e30a9297c5a4e0187e738
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Jun 6 09:24:04 2021 +0200

    CAMEL-16689: camel-core - Lazy start producer should re-create in case it failed to create or start the producer
---
 .../src/main/java/org/apache/camel/support/LazyStartProducer.java       | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/core/camel-support/src/main/java/org/apache/camel/support/LazyStartProducer.java b/core/camel-support/src/main/java/org/apache/camel/support/LazyStartProducer.java
index bdf8d670..0fea3c3 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/LazyStartProducer.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/LazyStartProducer.java
@@ -50,6 +50,8 @@ public final class LazyStartProducer extends DefaultAsyncProducer implements Del
                 }
             }
         } catch (Throwable e) {
+            // error creating or starting delegated failed, so allow to re-create on next call
+            delegate = null;
             exchange.setException(e);
             callback.done(true);
             return true;