I have an application powered by Spring Integration. in a nutshell the scheme is:
|-> activator
gateWay -> splitter -> transformer -> router |-> ...
|-> activator
For example, service get some json array, split it to json objects, then transforms them to some java object. While transforming it can throw some validation errors.
Spring Integration Reference says:
A Splitter is another type of Message Endpoint whose responsibility is to accept a Message from its input channel, split that Message into multiple Messages, and then send each of those to its output channel.
So I expect, that if I send an json array with one invalid object, which throw validation error, all other messages will be handled normally, and only one invalid object will be pushed to error channel. But it is not. When the first validation exception thrown, all other messages are not handled.
for example:
["correct", "correct", "invalid"] -->
2 messages will be handled, it's ok.
["invalid", "correct", "correct"] --> 0
messages will be handled.
So how to handle messages after splitting, even if there will be errors?
Thanks