How to set Spring Retry template to retry max attempts: infinite
Use AlwaysRetryPolicy
instead of SimpleRetryPolicy
.
But you might want to add a BackOffPolicy
to wait between retries.
You can then interrupt the thread to shut everything down.