camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cristisor <>
Subject Mixing ChoiceDefinition with DelayDefinition
Date Fri, 21 Jun 2013 10:59:49 GMT

I have the following route:
.otherwise().aggregate(new ObjectsAggregator()).constant(true)

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


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message