Maxim Markov
Maxim Markov

Reputation: 101

Camel - how to force splitter stop on exception and return aggregated result together with exception

How to implement such process with camel:

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

Answers (1)

Amrut Malaji
Amrut Malaji

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

Related Questions