0
votes

I am working on a Spring Batch job that calls a web service in the reader which returns a list of up to 1000 records. I would like to have the processor run on each record individually so the commit interval doesn't have the minimum of 1000. Can a single reader call produce multiple process calls if it returns a list?

From what I have found so far this may be possible but not worth the effort and I may be better off just having the reader return a list of objects and the processor processing up to 1000 records each read call.

1
Have you implemented a custom ItemReader? How do you call the web service? - lzagkaretos
Right now we do have a custom itemreader that calls a service and gets back (for simplicity here) an arraylist of 1000 strings. I would like to process strings individually, rather than passing out the array to the processor and making it do all 1000 at once. - user3728545
Fine. Can you please post code for a simplified ItemReader you have to take a look? Thanks. - lzagkaretos

1 Answers