-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Record doesn't get to DLT with FATAL exception and single-topic strategy #2118
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
Comments
@tomazfernandes Thanks; I am off work until Tuesday, so we might not be able to get these changes into Tuesday's releases, unless it's a relatively small PR. |
tomazfernandes
added a commit
to tomazfernandes/spring-kafka
that referenced
this issue
Feb 20, 2022
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.
tomazfernandes
added a commit
to tomazfernandes/spring-kafka
that referenced
this issue
Feb 20, 2022
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).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently if we throw a FATAL exception as per DLPR classification and we're using single topic strategy for fixed-delay non-blocking retries, the record doesn't get to the DLT.
To reproduce the issue, change the first listener in
RetryTopicIntegrationTests
to throw aConversionException
instead of theRuntimeException
, the test will fail because the dlt countdown latch is never triggered.This logic was introduced in DLPR to stop infinite loops for FATAL exceptions in DLT processing:
My suggestion is to have the FATAL classification in the
DefaultDestinationTopicResolver
, by having it extend theExceptionClassifier
class, and stop forwarding the record there, where we can know for sure we're in a DLT.Also add a flag to DLPR to toggle the current behavior and set it to false in RetryableTopic's logic.
This solution should also address #2113, and open the way for us to solve #2116.
I'm already working on this and should have a PR open soon, if that's ok.
Let me know if you have any concerns or anything I might be missing.
Thanks
The text was updated successfully, but these errors were encountered: