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:44:44 UTC

[camel] branch camel-3.11.x updated: 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 camel-3.11.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.11.x by this push:
     new 85c9266  CAMEL-16863: WireTap EIP should preserve OUT when copy mode.
85c9266 is described below

commit 85c9266d03412d5acaf9d08ad1899c970f814173
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);