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.
