You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by carnevalegiacomo <ca...@gmail.com> on 2014/07/04 08:04:16 UTC
Multicast parallel processing
Hi,
I'm trying to use multicast to execute parallel bean method invocation as
following:
-----------------------------
<multicast stopOnException="false" parallelProcessing="true">
<pipeline>
<bean ref="bean-1" method="method-1"/>
<setProperty propertyName="property-1">
<simple>${body}</simple>
</setProperty>
</pipeline>
<pipeline>
<bean ref="bean-2" method="method-2"/>
<setProperty propertyName="property-2">
<simple>${body}</simple>
</setProperty>
</pipeline>
</multicast>
<log message="${property.property-1}"/>//The property is empty
<log message="${property.property-2}"/>//The property is not empty
--------------------------
How can I get property-1 after the multicast?
Thanks
Giacomo
--
View this message in context: http://camel.465427.n5.nabble.com/Multicast-parallel-processing-tp5753313.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Multicast parallel processing
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Use a custom aggregation strategy to "merge" the results of the
multicast. Otherwise it returns the last exchange out of the box.
On Fri, Jul 4, 2014 at 8:04 AM, carnevalegiacomo
<ca...@gmail.com> wrote:
> Hi,
> I'm trying to use multicast to execute parallel bean method invocation as
> following:
> -----------------------------
> <multicast stopOnException="false" parallelProcessing="true">
> <pipeline>
> <bean ref="bean-1" method="method-1"/>
> <setProperty propertyName="property-1">
> <simple>${body}</simple>
> </setProperty>
> </pipeline>
> <pipeline>
> <bean ref="bean-2" method="method-2"/>
> <setProperty propertyName="property-2">
> <simple>${body}</simple>
> </setProperty>
> </pipeline>
> </multicast>
> <log message="${property.property-1}"/>//The property is empty
> <log message="${property.property-2}"/>//The property is not empty
> --------------------------
> How can I get property-1 after the multicast?
>
> Thanks
>
> Giacomo
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Multicast-parallel-processing-tp5753313.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/