camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pminearo <pmine...@reardencommerce.com>
Subject Default Behavior for aggregate
Date Mon, 11 Apr 2011 20:14:41 GMT
I didn't see anything posted on this (though I may have missed it).  I am
using Camel 2.7.0.

When using aggregate(), is there a default behavior?  What I mean by this
is, let say you have the following Route in your RouteBUilder:


from("jms:queue:myQueue").aggregate().process(new
BatchSaveMessagesToDBProcessor());


Would the default behavior of Camel be to just create a List of whatever
objects are in Exchange.getIn().getBody()?

I noticed there are 4 different aggregate() methods:


aggregate()
aggregate(AggregationStrategy)

aggregate(Expression)
aggregate(Expression, AggregationStrategy)

Let's say all you want to do is batch up the messages coming in in order to
do a batch save to the DB; would you need to specify an AggregationStrategy
and/or Expression; or will Camel handle creating a List of what is in the
"In" message body?

What I have noticed is aggregate() and aggregate(AggregationStrategy) have a
different API than aggregate(Expression) and aggregate(Expression,
AggregationStrategy).  Why the difference?

Thanks!

--
View this message in context: http://camel.465427.n5.nabble.com/Default-Behavior-for-aggregate-tp4296790p4296790.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message