I'm reading files line by line using FileSplitter, and then filter some of the corrupted lines - as to discard some lines - in order to do webservices calls for each line.
What I need to do in addition to this is to get the file moved to completed files directory.
Update: Just to be more clear, the successful/good lines after filtering will need to be aggregated in a file to be written to the completed directory and the corrupted/filtered lines will be written to another one.
Mentioning the above, I was not clear about the following points:
- Will I need some kind of correlation between the messages/lines as to provide it manually or Spring Integration will do it for me?
- If some lines are discarded due to the filtering, what is the right strategy to use with the aggregator?
- How can I make use of file markers as to identify when the file is completed to move to the completed directory?
The scenario simply looks like:
FileSplitter -> line Filter -> Outbound Gateway (webservices) -> Aggregator