Reputation: 11
I am trying to implement multithreading in spring batch. In my implementation i want
I can't implement general chunking as there reader will be multhreded which i don't want.
So next option is asyncItemProcessor/asynchItemWriter. But what i have seen that reader and writer are single threaded only 'asyncItemProcessor' runs in multiple threads in 'asyncItemProcessor/asynchItemWriter.
Is there is anyway where i can run 'Reader' single threaded and processor and writer as multithreaded ?
Upvotes: 0
Views: 373
Reputation: 31600
i want
- Single multithreaded Reader (As we are reading only one file)
- Multi thread processor and writer
Is there is anyway where i can run 'Reader' single threaded and processor and writer as multithreaded ?
You can use a regular non multi-threaded chunk-oriented step with a reader and a AsyncItemProcessor + AsyncItemWriter (those should be used in conjunction) to achieve that.
Upvotes: 1