From the course: Spring: Spring Batch

Unlock the full course today

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

Retry logic

Retry logic

From the course: Spring: Spring Batch

Start my 1-month free trial

Retry logic

- [Instructor] When processing chunks of data in a batch job, issues can arise that are just a matter of bad timing and they can be resolved by simply reattempting to process an item. For these types of issues, Spring Batch's retry capability can prevent bad timing from turning into late night phone calls. Let's imagine we kick off a job and that we must call a web service to process items within our data set. During processing of the second item in the chunk, the web service has an intermittent issue. It's not a hard failure. It could just be small network blip. If we have configured Spring Batch's retry capabilities, the framework will reattempt processing of the item. This time when we attempt to process the item, the web service has become available. So, when we reattempt processing, the item will complete successfully without any intervention by a batch job operator. Our job then can successfully complete without…

Contents