user
user

Reputation: 5

Error handler not called until after all retries are attempted in Spring Cloud Stream

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

Answers (1)

Gary Russell
Gary Russell

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

Related Questions