camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r620004 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java
Date Fri, 08 Feb 2008 21:29:58 GMT
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)
{



Mime
View raw message