Skip to content

Instantly share code, notes, and snippets.

@schroedermatt
Created November 16, 2018 04:21
Show Gist options
  • Select an option

  • Save schroedermatt/8cd1fd8dcfa7c3fa30ad159cee539f11 to your computer and use it in GitHub Desktop.

Select an option

Save schroedermatt/8cd1fd8dcfa7c3fa30ad159cee539f11 to your computer and use it in GitHub Desktop.
A list of the available Spring Retry backoff policies.
ExponentialBackOffPolicy: increases back off period exponentially. The initial interval and multiplier are configurable.
ExponentialRandomBackoffPolicy: chooses a random multiple of the interval that would come from a simple deterministic exponential. This has shown to at least be useful in testing scenarios where excessive contention is generated by the test needing many retries.
FixedBackOffPolicy: pauses for a fixed period of time (using Sleeper.sleep(long)) before continuing.
NoBackOffPolicy: performs all retries one after the other without pause
UniformRandomBackOffPolicy: pauses for random period of time before continuing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment