From the course: Spring: Spring Batch

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Parallel flows

Parallel flows

From the course: Spring: Spring Batch

Start my 1-month free trial

Parallel flows

- When building a batch job, typically we execute steps in sequence: one step at a time. There can be scenarios when two steps must execute in parallel. Spring Batch supports this functionality by providing splits. A split allows us to execute two flows simultaneously using multiple threads. This technique can be used to improve the performance of a job. In order to take a look at a split, we're going to be adding a Billing Flow. So we'll modify our Billing Job and turn it into a flow. And then within our Deliver Package Job, we're going to execute the Delivery Flow and the Billing Flow in parallel using a split. In order to work with a split, we'll need to build another flow. So I'm going to navigate to our Billing Job, and I'm going to copy the configuration of the Billing Job. And then we're going to modify it in order to turn this job into a flow. So we'll need to return a flow from our method because that's the…

Contents