-
Notifications
You must be signed in to change notification settings - Fork 519
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
RetryContext#EXHAUSTED in RetryListener#onError #149
Comments
You can ask the |
Hmmn yes that could work - not sure how i can get a handle on a (or more exactly the matching) RetryPolicy in the onError-Scope though. |
Same issue here. Since the Why does Happy to submit a PR, just need to understand the reasoning behind how it currently works. Thanks. |
I guess we could add the |
According to the Javadoc, |
Correct, I think (at least for stateless retry). So you need both callbacks ( You could override the |
Hello! I have a similar issue, I want track errors on retries, but avoid the last because I throw particular ex on recovery and tracking differently.. using OnError last error is tracked twice. I could override the BackOffPolicy, but in this scope not have the exception. any update of this or another workaround that can I try? Thanks. |
The last exception is always available from the |
Oh sorry, I don't see that, It is very useful for me. Thanks! |
In my RetryListener Implementation I would like to be able to know if the failed retry is the very last one / final one.
I thought that would be possible by checking whether the context is exhausted like this:
turns out the retryContext never has a set EXHAUSTED-Attribute. In onClose it is set - but not useful to me.
I did not find another (elegant) way to check whether the current retry
retryContext.getRetryCount()
is the final retry before the exception gets thrown to the caller.Background: I'd like to log retries that have been performed - but not the final one, as that one will lead to an exception log anyway.
The text was updated successfully, but these errors were encountered: