Skip to content

Instantly share code, notes, and snippets.

@dhaval201279
Last active May 19, 2020 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhaval201279/e6a1c596886e5579c54e36d7f3f435b0 to your computer and use it in GitHub Desktop.
Save dhaval201279/e6a1c596886e5579c54e36d7f3f435b0 to your computer and use it in GitHub Desktop.
Implementing retryable RestClient using Spring Retry
@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