Fatal exceptions in Combining Blocking and Non-Blocking Retries #2455
-
Documentation reference: link.
I was not able to understand how to configure something like this:
But, as far as I can verify here, exceptions added to Also, I think the documentation above is a bit confusing. In the code example "Here’s an example with both configurations working together:", I do not understand how the behaviour for Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Since You need to be more specific with the exception type(s) that you want to try in a blocking fashion. We could look at adding some mechanism to handle this use case but, in the meantime, use narrower exception types for blocking. |
Beta Was this translation helpful? Give feedback.
RuntimeException
is too general here; the exception classifier for the retryable topic, by default, retries no exceptions (ExceptionClassifier.defaultFalse()
) so that all exceptions go through the non-blocking retry chain (or straight to the DLT, depending on the type).Since
RuntimeException
is a super class for many exceptions, they will all be retried blocking, before going through the retry chain.You need to be more specific with the exception type(s) that you want to try in a blocking fashion.
We could look at adding some mechanism to handle this use case but, in the meantime, use narrower exception types for blocking.