Skip to main content
Version: Current

BackoffOptions

@rotorsoft/act-root


@rotorsoft/act-root / act/src / BackoffOptions

Type Alias: BackoffOptions

BackoffOptions = object

Defined in: libs/act/src/types/action.ts:529

Retry backoff configuration.

Validated at its declaration site (reaction .do(...) / action .on(...)): an off-union strategy, a non-finite/negative baseMs, or a non-finite/non-positive maxMs throws ZodError at act().build() rather than producing a NaN delay that silently disables pacing (ACT-1269).

Propertiesโ€‹

baseMsโ€‹

readonly baseMs: number

Defined in: libs/act/src/types/action.ts:531

Base delay (must be finite and โ‰ฅ 0)


jitter?โ€‹

readonly optional jitter?: boolean

Defined in: libs/act/src/types/action.ts:533

Multiply final delay by 0.5 + random() (range [0.5, 1.5)) to avoid thundering herds when many callers retry in lockstep


maxMs?โ€‹

readonly optional maxMs?: number

Defined in: libs/act/src/types/action.ts:532

Optional cap (finite, > 0); only used by exponential


strategyโ€‹

readonly strategy: BackoffStrategy

Defined in: libs/act/src/types/action.ts:530

BackoffStrategy