remote chunking with the control on reader in spri

2019-08-13 00:12发布

问题:

I have to use spring batch to read the file and process the contents in batches. I thought of using remote chunking, but it wont meet my actual requirement. I just mentioned my requirement below;

                      ____Item Processor1---->
                     |                       |
   Item Reader --->Item --Item Processor2----> ---ItemWriter
                     |                       |
                     | -- Item Processor n--->

Say for example, if my commit count is 20, I wanted the ItemReader to read 20 items and should distribute to the concurrent processors and the same should commit by the ItemWriter, and the next 20 records should read only after the successful completion of first chunk of 20.

Can anybody please help me to resolve the requirement please?

Thanks in advance.