RateLimiterConfig

constructor(algorithm: RateLimitingAlgorithm, baseTimeoutDuration: Duration, onRejected: ExceptionHandler)(source)

Parameters

algorithm

The algorithm that will be used to determine the rate limiting behavior. See RateLimitingAlgorithm for more details.

baseTimeoutDuration

The default duration a request will be placed in the queue if rate-limited. After this duration, the request will be rejected.

onRejected

The exception handler that will be called when a request is rejected by the rate limiter.