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/08/30 20:43:36 UTC
[camel] 02/02: CAMEL-16863: WireTap EIP should preserve OUT when
copy mode.
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 976934878a6cec252fa3c27d02c1149cd870e267
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 30 22:33:37 2021 +0200
CAMEL-16863: WireTap EIP should preserve OUT when copy mode.
---
.../src/main/java/org/apache/camel/processor/WireTapProcessor.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
index f90f7f2..96e27fc 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
@@ -279,6 +279,11 @@ public class WireTapProcessor extends AsyncProcessorSupport
Exchange copy = processorExchangeFactory.createCorrelatedCopy(exchange, false);
// set MEP to InOnly as this wire tap is a fire and forget
copy.setPattern(ExchangePattern.InOnly);
+ // move OUT to IN if needed
+ if (copy.hasOut()) {
+ copy.setIn(copy.getOut());
+ copy.setOut(null);
+ }
// remove STREAM_CACHE_UNIT_OF_WORK property because this wire tap will
// close its own created stream cache(s)
copy.removeProperty(ExchangePropertyKey.STREAM_CACHE_UNIT_OF_WORK);