Reputation: 5
I am trying to write an error handler for my spring cloud stream application; however, the error handler is only called after all retries have been attempted. Is there a way to catch each exception and process them individually instead of waiting for the retries to be exhausted?
Upvotes: 0
Views: 164
Reputation: 174554
What do you mean by "process" ?
The whole point of retry is to retry failures until successful or retries are exhausted.
That said, you can wire up your own RetryTemplate
as described here and add a RetryListener
to it so you can be notified of each failure.
Upvotes: 2