简体   繁体   中英

using spring batch to execute jobs in parallel

I have a use case as follows:

1)There is a Parentjob which has multiple child jobs.
2)All child jobs should be executed in parallel.
3)The parent job should wait until all child jobs are done.
4)One child jobs are done control returns to master
5)Master job is completed.
6)In case any of the child job throws exception then also control should return to master job

Is this possible using spring batch?

EDIT : Am not looking to execute multiple steps of job in parellel.But multiple child jobs of same parent in parallel

Maybe something like that?

  1. Create job
  2. Add chunk tasklet to this job.
    1. Reader get new job
    2. Processor start it
  3. Run this chunk with task executor and thread pool with 10 threads.
  4. Profit! :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM