Hello.
I'm looking for a way to read large files. After FileReadingMessageSource provides a Message<File>w I want to open the file stream and iterate with LineNumberReader, and send Message<String> for every line. It will be blocked by the channel until the consumer of the messages will process them. As the consumer advances, more lines of file would be read.
I cannot implement a splitter, because I don't want to read the whole file at once and return List<String>. If I could return Iterator<String>, it would solve the problem.
So what's the best approach to this?
Thank you.
Andrew.


Reply With Quote
