Skip to content

Instantly share code, notes, and snippets.

@dev-aritra
Created January 17, 2023 05:34
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 dev-aritra/4c96da8c15551a91022045da7c05da5b to your computer and use it in GitHub Desktop.
Save dev-aritra/4c96da8c15551a91022045da7c05da5b to your computer and use it in GitHub Desktop.
public RetryTemplate eventConsumerRetryTemplate(int maxAttempts) {
return RetryTemplate.builder()
.retryOn(RetryableException.class)
.maxAttempts(maxAttempts)
.exponentialBackoff(100, 2, 300)
.traversingCauses()
.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment