Class ResilienceRegistries


  • @Beta
    public class ResilienceRegistries
    extends Object
    • Field Detail

      • DEFAULT_RETRY_CONFIG

        public static final io.github.resilience4j.retry.RetryConfig DEFAULT_RETRY_CONFIG
      • NON_IDEMPOTENTE_CALLS_RETRY_CONFIG_NAME

        public static final String NON_IDEMPOTENTE_CALLS_RETRY_CONFIG_NAME
        See Also:
        Constant Field Values
      • DEFAULT_NON_IDEMPOTENTE_CALLS_RETRY_CONFIG

        public static final io.github.resilience4j.retry.RetryConfig DEFAULT_NON_IDEMPOTENTE_CALLS_RETRY_CONFIG
        Suggested for calls that are not idemotente like placing order or withrawing funds

        Well designed exchange APIs will have mechanisms that make even placing orders idemotent. Most however cannot handle retrys on this type of calls and if you do one after a socket read timeout for eq. then this may result in placing two identical orders instead of one. For such exchanged this retry configuration is recomended.

      • DEFAULT_GLOBAL_RATE_LIMITER_CONFIG

        public static final io.github.resilience4j.ratelimiter.RateLimiterConfig DEFAULT_GLOBAL_RATE_LIMITER_CONFIG
    • Constructor Detail

      • ResilienceRegistries

        public ResilienceRegistries()
      • ResilienceRegistries

        public ResilienceRegistries​(io.github.resilience4j.retry.RetryConfig globalRetryConfig,
                                    io.github.resilience4j.retry.RetryConfig nonIdempotenteCallsRetryConfig)
      • ResilienceRegistries

        public ResilienceRegistries​(io.github.resilience4j.retry.RetryConfig globalRetryConfig,
                                    io.github.resilience4j.retry.RetryConfig nonIdempotenteCallsRetryConfig,
                                    io.github.resilience4j.ratelimiter.RateLimiterConfig globalRateLimiterConfig)
      • ResilienceRegistries

        public ResilienceRegistries​(io.github.resilience4j.retry.RetryRegistry retryRegistry,
                                    io.github.resilience4j.ratelimiter.RateLimiterRegistry rateLimiterRegistry)
    • Method Detail

      • retries

        public io.github.resilience4j.retry.RetryRegistry retries()
      • rateLimiters

        public io.github.resilience4j.ratelimiter.RateLimiterRegistry rateLimiters()