
Originally Posted by
Dave Syer
The TaskExecutorPartitionHandler might work for you. The biggest problem might be knowing how to partition the file into line ranges - you need to know how many lines there are before you start, which could be tough for large files. Some projects have used native DB loaders to load the file into a database table (one column for the whole line) and found that this was quicker than trying to partition the file itself.
If you partition the file, you can limit the number of lines read by an individual instance of FlatFileItemReader using execution context entries <reader_name>.item.count, <reader_name>.item.count.max (where reader_name is the name you gave the component). This feature is not very clearly documented (and I think the "max" property was added since RC1), so I'd be interested to hear what your experience is.