Table of Contents

Enum BackoffStrategy

Namespace
Excalibur.Dispatch.Resilience
Assembly
Excalibur.Dispatch.dll

Defines the growth law for retry delays.

public enum BackoffStrategy
Extension Methods

Fields

Constant = 0

The same delay before every attempt: baseDelay.

Exponential = 2

Delay grows geometrically: min(baseDelay * multiplier^(attempt-1), maxDelay).

Linear = 1

Delay grows in proportion to the attempt number: min(baseDelay * attempt, maxDelay).

Remarks

Three growth laws, and jitter is a separate switch. These members name only how the nominal delay GROWS with the attempt number. Whether that delay is then randomised is RetryOptions.UseJitter, which applies to every member here. Earlier versions folded jitter into the strategy name, and that produced two public knobs for one concept whose interaction nothing documented: a strategy called ExponentialWithJitter that ignored UseJitter, and a UseJitter that the default strategy silently discarded.

These are the same three laws, with the same names, as Polly's DelayBackoffType. That is deliberate: the opt-in Excalibur.Dispatch.Resilience.Polly package maps this enum onto Polly one-to-one, exhaustively, with no fall-through. A consumer who knows Polly already knows this surface, and -- more importantly -- a member cannot be added here and silently reinterpreted as something else there, because the mapping has no default arm to absorb it. A new member is a compile error in the adapter until it is mapped, which is where that decision belongs.

If you need a curve that is not one of these -- Fibonacci growth, a bespoke ladder, a sequence read from configuration -- implement IBackoffCalculator and register it. That is the escape hatch, and it is the same shape as Polly's own DelayGenerator: three laws cover the cases worth naming, and anything else is a function the consumer supplies rather than a member we enumerate.