I am new to Spring batch with spring boot and read almost all the possible available article but not found exact scenarios/snippets for use case as below.
- Read data from DB (for example : 5 Items)
- Process the data : Call API and if API call Fails skip the Item and process the next item. (For all 5 items in sequence)
- All skipped items should be logged in db
- After Processing all the 5 items with failed/success scenario then retry failed items after some time interval.
I have used the RetryTemplate
but there it retries the item on exception immediately so it's not working for me.
I have created skip policy which skips the exception and gave me the expected behavior but not able start the retry attempts(3) the same way..
Can somebody please help with some examples and guide me on the same...