Team,
I am doing a technical poc for reading records from a flat file and inserting the data to database.
I am using chunk task and running this job using spring batch admin successfully.
I have to implement the retry policy along with a feature to set the time interval between each retry. I am stuck up with setting the time interval between each retry as chuck doesn't support it directly. Is there any work around for this?
My code is
<batch:job id="importDataJob" job-repository="jobRepository">
<batch:step id="importDataStep">
<batch:tasklet transaction-manager="transactionManager">
<batch:chunk reader="dataReader" writer="dataWriter" commit-interval="1" retry-limit="3">
<batch:retryable-exception-classes>
<batch:include class="javax.naming.ServiceUnavailableException" />
</batch:retryable-exception-classes>
</batch:chunk>
</batch:tasklet>
</batch:step>
</batch:job>