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/03/19 10:42:14 UTC

[camel] branch master updated: CAMEL-16295: fix aggregation when in transacted route

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new bec6a45  CAMEL-16295: fix aggregation when in transacted route
bec6a45 is described below

commit bec6a453b456e11f30c1ddf9502ef67ff1b896a1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Mar 19 11:41:32 2021 +0100

    CAMEL-16295: fix aggregation when in transacted route
---
 .../src/main/java/org/apache/camel/AggregationStrategy.java         | 4 ++--
 .../main/java/org/apache/camel/processor/MulticastProcessor.java    | 6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/AggregationStrategy.java b/core/camel-api/src/main/java/org/apache/camel/AggregationStrategy.java
index 32c11a6..d66eac8 100644
--- a/core/camel-api/src/main/java/org/apache/camel/AggregationStrategy.java
+++ b/core/camel-api/src/main/java/org/apache/camel/AggregationStrategy.java
@@ -72,8 +72,8 @@ public interface AggregationStrategy {
      * Important: In the aggregate method, do not create a new exchange instance to return, instead return either the
      * old or new exchange from the input parameters; favor returning the old exchange whenever possible.
      * <p/>
-     * Important: Only Multicast and Recipient List EIP supports this method with access to the input exchange. All
-     * other EIPs does not and uses the {@link #aggregate(Exchange, Exchange)} method instead.
+     * Important: Only Multicast, Recipient List, and Splitter EIP supports this method with access to the input exchange.
+     * All other EIPs does not and uses the {@link #aggregate(Exchange, Exchange)} method instead.
      *
      * @param  oldExchange   the oldest exchange (is <tt>null</tt> on first aggregation as we only have the new
      *                       exchange)
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 ecbbea9..75e2a90 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
@@ -596,7 +596,11 @@ public class MulticastProcessor extends AsyncProcessorSupport
             });
 
             // next step
-            return true;
+            if (hasNext && !isParallelProcessing()) {
+                return true;
+            } else {
+                return false;
+            }
         }
     }