We are using Spring Batch to do some processing, reading some ids via Reader and we want to process them as 'chunks' via a processor then write to multiple files. But the processor interface allows only one item to processed at a time, we need to do bulk processing because the processor depends on a third party and calling the service for each item is not an option.
I saw that we can create Wrappers for all Reader-Processor-Writers involved in the 'chunk' to handle List<> and delegate to some concrete reader/processor/writer. but that doesn't seem all nice to me. Like this:
<batch:chunk reader="wrappedReader" processor="wrappedProcessor" writer="wrappedWriter"
commit-interval="2"/>
Is there a 'chunking' option that lets chunking before the processor? rather than before Writer.
Cheers,