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
The following commit(s) were added to refs/heads/main by this push: new bcab96be48e CAMEL-19066: Do not copy correlationId after multicast (#9367) bcab96be48e is described below commit bcab96be48e43d93bad047c4c90ac7cf474f4212 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Feb 17 19:33:37 2023 +0100 CAMEL-19066: Do not copy correlationId after multicast (#9367) --- .../main/java/org/apache/camel/processor/MulticastProcessor.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java index 02ec99f4478..d3531637319 100644 --- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java +++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java @@ -799,10 +799,13 @@ public class MulticastProcessor extends AsyncProcessorSupport // if we stopped due an exception then only propagate the exception original.setException(subExchange.getException()); } else { - // copy the current result to original, so it will contain this result of this eip + // copy the current result to original (preserve original correlation id), + // so it will contain this result of this eip Object correlationId = subExchange.removeProperty(ExchangePropertyKey.CORRELATION_ID); ExchangeHelper.copyResults(original, subExchange); - subExchange.setProperty(ExchangePropertyKey.CORRELATION_ID, correlationId); + if (correlationId != null) { + subExchange.setProperty(ExchangePropertyKey.CORRELATION_ID, correlationId); + } } }