Last active
May 19, 2020 04:56
-
-
Save dhaval201279/e6a1c596886e5579c54e36d7f3f435b0 to your computer and use it in GitHub Desktop.
Implementing retryable RestClient using Spring Retry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Retryable(value = {RemoteServiceUnavailableException.class}, maxAttempts = 8, | |
backoff = @Backoff(delay = 1000, multiplier = 2), label = "generate-alias-retry-label") | |
String generateAlias(String cardNo); | |
@Recover | |
String fallbackForGenerateAlias(Throwable th, String cardNo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment