-
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
Spring Retry + Hystrix issue #46
Comments
Nesting |
@dsyer could you plz specify? I never came around a first-class citizen in Hystrix that would allow me to configure retries properly... also Netflix states:
|
I guess I was confused. We use Hystrix with Ribbon/Feign/Zuul so much I probably thought the retry features were in the former not the latter. If you work out how to customize the exception classifier so it works please consider sending a pull request (here or to spring-cloud-netflix, if it is Hystrix specific). Or use |
I noticed that |
I have a @HystrixCommand annotated method that makes a restTemplate call. I also have another one that makes a SOAP call. When an exception is thrown inside the hystrixcommand annotated method, it returns a HystrixRuntimeException, and nested in that exception is the actual exception that was thrown, for instance httpClientErrorException, socketTimeout, or SoapFault.
I call these hystrixCommands from within a Spring RetryTemplate, but the problem is that I am having trouble make the RetryTemplate only retry on certain exceptions that are the nested exceptions within the HystrixRuntimeException.
The scenario now is such that, Spring retryTemplate will only retry if there is a HystrixRuntime Exception, I want to retry based on the excpetions nested within the hystrixRuntime Exception.
AccountClient.java
AccountService.java
RetryTemplate bean in @configuration class
The text was updated successfully, but these errors were encountered: