Reputation: 101
How to implement such process with camel:
split
process each splitted item
aggregate results
if exception occurs:
stop splitting
return aggregation result of all items before exception together with exception information
Defining .stopOnException() on split, I can achieve stopping the process and outputting exception information without aggregated result.
Is it possible by handling exception inside Aggregation Strategy force splitter to stop processing all remaining items?
Upvotes: 3
Views: 1402
Reputation: 21
I believe you are talking about the Split exchanges getting stoped upon exception.
in camel 2.2, your Sub exchanges will get processed and if there is any exception further messages will also be processod and in the Aggregation you can look/analyse on this.
.stopOnExceptions(false)
Camel 2.2: Whether or not to stop continue processing immediately when an exception occurred. If disable, then Camel continue splitting and process the sub-messages regardless if one of them failed. You can deal with exceptions in the AggregationStrategy class where you have full control how to handle that.
Upvotes: 0