amqpx / index / retryStrategies / polynomialBackoff
Function: polynomialBackoff()
polynomialBackoff(
multiplier,exponent?,jitter?): (step) =>number
Defined in: src/retry/time-strategies.ts:78
Increases the delay each step using the formula multiplier * step^exponent. For exponent=2 (quadratic) and multiplier=100 results in the series: 100, 400, 900, 1600, ...
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
multiplier | number | undefined | Multiplier of the function, specifying the delay at the first step. |
exponent | number | 2 | Exponent of the polynomial. Default is 2 (quadratic). |
jitter | number | 0.25 | Jitter factor in [0, 1]. Randomizes the delay within ±jitter * delay. Use 0 to disable jitter. |
Returns
(step) => number