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/08 16:10:25 UTC
(camel) 03/06: CAMEL-20297 camel-rocketmq: 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 80921f085bd7dc727b98c17423ec4e7ef9b2fff0
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jan 5 11:19:47 2024 +0100
CAMEL-20297 camel-rocketmq: do not swallow interrupted exceptions
---
.../java/org/apache/camel/component/rocketmq/RocketMQProducer.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/components/camel-rocketmq/src/main/java/org/apache/camel/component/rocketmq/RocketMQProducer.java b/components/camel-rocketmq/src/main/java/org/apache/camel/component/rocketmq/RocketMQProducer.java
index e64305ff941..a07006f7695 100644
--- a/components/camel-rocketmq/src/main/java/org/apache/camel/component/rocketmq/RocketMQProducer.java
+++ b/components/camel-rocketmq/src/main/java/org/apache/camel/component/rocketmq/RocketMQProducer.java
@@ -79,6 +79,11 @@ public class RocketMQProducer extends DefaultAsyncProducer {
} else {
return processInOnly(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);