Interface RetryConfig

All Known Subinterfaces:
RetryConfig.BuildableRetryConfig

public interface RetryConfig
  • Field Details

  • Method Details

    • timeout

      @WithDefault("PT15S") Duration timeout()
      Maximum allowed time until a retry-loop and commits fails with a RetryTimeoutException, defaults to "PT15S".
    • retries

      @WithDefault("10000") int retries()
      Maximum number of allowed retries, defaults to "10000".
    • initialSleepLower

      @WithDefault("PT0.010S") Duration initialSleepLower()
      Initial lower bound for a retry-sleep duration for the retry-loop, defaults to DEFAULT_RETRY_INITIAL_SLEEP_LOWER. This value will be doubled after each retry, as long as maxSleep() is not exceeded. A concrete sleep duration will be randomly chosen between the current lower and upper bounds.
    • initialSleepUpper

      @WithDefault("PT0.020S") Duration initialSleepUpper()
      Initial upper bound for a retry-sleep duration for the retry-loop, defaults to DEFAULT_RETRY_INITIAL_SLEEP_UPPER. This value will be doubled after each retry, as long as maxSleep() is not exceeded. A concrete sleep duration will be randomly chosen between the current lower and upper bounds.
    • maxSleep

      @WithDefault("PT0.250S") Duration maxSleep()
      Maximum retry-sleep duration, defaults to DEFAULT_RETRY_MAX_SLEEP.
    • fairRetries

      @WithDefault("SLEEPING") FairRetriesType fairRetries()
      Without mitigation, very frequently started retry-loops running against highly contended resources can result in some retry-loops invocations never making any progress and eventually time out.

      The default "fair retries type" helps in these scenarios with sacrificing the overall throughput too much.