New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider routing messages that fail due to a fatal exception straight into the dead letter topic #2113
Comments
Hi @v-chernyshev, thanks for the suggestion. Just to be clear, we're talking about a manageable global set of FATAL exceptions that will route the record straight to the DLT, different from the topic-by-topic classification configuration we currently have. I'm currently working on another issue that is related and should address this too, so hopefully we should have this ready soon. |
Fixes spring-projectsGH-2118 The logic introduced to stop endless loops in DLR processing for fatal exceptions interferes with RT's single-topic strategy. Make it optional and set the default to false in DLPRF for RT. The loop is now addressed in DefaultDestinationTopicResolver as in spring-projectsGH-2113.
Resolves spring-projectsGH-2113 Adds exception classification to DefaultDestinationTopicResolver so that fatal exceptions makes records go straight to the DLT. Also stop DLT processing if such an exception is found (see spring-projectsGH-2118).
@v-chernyshev, I opened a PR with this feature, if maybe you want to take a look Thanks again for the suggestion |
Thanks for implementing this suggestion so quickly! I had a look through the PR and it looks good to me, but I'm by no means comfortable with the implementation details of Spring Kafka :) |
@v-chernyshev thanks for looking into the PR and for the feature suggestion. This feature will be available in today’s release, feel free to try it out and provide feedback! |
Expected Behavior
It would be great to have a setting that would instruct the retryable topics system to skip the recovery attempts if one of the fatal-by-default exceptions is encountered during the message processing as it is highly likely that the malformed messages will fail in the retry topics too.
Current Behavior
The current implementation (assuming no
notRetryOn
overrides) routes the failed messages to the next retry topic in the recovery chain, until they eventually reach the DLT. There doesn't seem to be a way to programmatically query the default list of fatal exceptions either, which basically means that I have to copy-paste them somewhere to pass intonoRetryOn
.Context
The main goal here is to avoid pointless recovery attempts for poison pill messages. See this StackOverflow question for more information. The only workaround I can think of is declaring a duplicate list of fatal exceptions, e.g.:
It may then be passed into
notRetryOn
.The text was updated successfully, but these errors were encountered: