Hi Use a new route for the aggregate, and then use "direct:xxx" endpoint from the choice to call that route.
On Fri, Jun 21, 2013 at 12:59 PM, cristisor <[email protected]> wrote: > Hello, > > I have the following route: > from(startEndpoint) > .choice() > .when(fileIsComplete()).delay(COMPLETION_TIMEOUT).process(processor).to(outputEndpoint) > .otherwise().aggregate(new ObjectsAggregator()).constant(true) > .completionSize(BATCH_SIZE).completionTimeout(COMPLETION_TIMEOUT) > .process(processor).stop(); > > So, if the fileIsComplete is true, process only one exchange and send the > response to another endpoint otherwise aggregate up to a number of > BATCH_SIZE, process in the end, and stop the routing. > > Because my Camel version is pretty old (2.4.0-fuse-00-00) I don't have > "endChoice", so if I insert the delay or the aggregator I can't access the > "otherwise" branch. I really need both of them so I thought to insert > another processor, before the actual processing, that puts the current > thread to sleep for COMPLETION_TIMEOUT and leave the aggregation to the > other branch, since I won't have to continue using the ChoiceDefinition. > > Is there a better way to solve this problem without upgrading the Camel > version? > > Thanks. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Mixing-ChoiceDefinition-with-DelayDefinition-tp5734524.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
