You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Andreas A." <an...@gmail.com> on 2010/11/19 11:33:39 UTC

What happens when using same AggregationStrategy in multiple routes?

Hi

I have a two routes that use the same AggregationStrategy, and I'm loading
the AggregationStrategy as a Spring bean (which is a singleton). If the two
routes run simultaneously can the messages be mixed up? Should I load the
bean as prototype, or is this taken care of by Camel somehow?
-- 
View this message in context: http://camel.465427.n5.nabble.com/What-happens-when-using-same-AggregationStrategy-in-multiple-routes-tp3272140p3272140.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: What happens when using same AggregationStrategy in multiple routes?

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Nov 19, 2010 at 11:33 AM, Andreas A. <an...@gmail.com> wrote:
>
> Hi
>
> I have a two routes that use the same AggregationStrategy, and I'm loading
> the AggregationStrategy as a Spring bean (which is a singleton). If the two
> routes run simultaneously can the messages be mixed up? Should I load the
> bean as prototype, or is this taken care of by Camel somehow?
> --

You are only in trouble if the strategy stores state and thus is not
thread safe.



> View this message in context: http://camel.465427.n5.nabble.com/What-happens-when-using-same-AggregationStrategy-in-multiple-routes-tp3272140p3272140.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/