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 2024/01/12 14:46:31 UTC
(camel) 03/06: CAMEL-20297 camel-kamelet: do not swallow interrupted exceptions
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
commit 9077f5a9efc87c5ae7687385ee1273021f4415d8
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 12 10:49:19 2024 +0100
CAMEL-20297 camel-kamelet: do not swallow interrupted exceptions
---
.../java/org/apache/camel/component/kamelet/KameletProducer.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
index 8762f85561e..cc05702c5e8 100644
--- a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
+++ b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
@@ -112,6 +112,11 @@ final class KameletProducer extends DefaultAsyncProducer {
// kamelet producer that calls its kamelet consumer to process the incoming exchange
return consumer.getAsyncProcessor().process(exchange, callback);
}
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ exchange.setException(e);
+ callback.done(true);
+ return true;
} catch (Exception e) {
exchange.setException(e);
callback.done(true);