You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2008/02/08 22:29:58 UTC

svn commit: r620004 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java

Author: hadrian
Date: Fri Feb  8 13:29:52 2008
New Revision: 620004

URL: http://svn.apache.org/viewvc?rev=620004&view=rev
Log:
CAMEL-291.  Use multicast instead of pipeline for recipientList.

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java?rev=620004&r1=620003&r2=620004&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java Fri Feb  8 13:29:52 2008
@@ -28,6 +28,7 @@
 import org.apache.camel.AsyncCallback;
 import org.apache.camel.converter.ObjectConverter;
 import org.apache.camel.impl.ServiceSupport;
+import org.apache.camel.processor.aggregate.UseLatestAggregationStrategy;
 import org.apache.camel.util.ExchangeHelper;
 import static org.apache.camel.util.ObjectHelper.notNull;
 import org.apache.camel.util.ProducerCache;
@@ -64,9 +65,9 @@
             Producer<Exchange> producer = producerCache.getProducer(endpoint);
             processors.add(producer);
         }
-        // TODO we could support a multicast option?
-        Pipeline pipeline = new Pipeline(processors);
-        pipeline.process(exchange);
+        MulticastProcessor mp = new MulticastProcessor(processors, 
+        		new UseLatestAggregationStrategy());
+        mp.process(exchange);
     }
 
     protected Endpoint<Exchange> resolveEndpoint(Exchange exchange, Object recipient) {