Table of Contents

Class Retry

Namespace
Millrace
Assembly
Millrace.dll

Retry policy for a job. Serialized into the JobRecord as plain data — the engine, not the storage provider, evaluates it. MaxAttempts counts total attempts including the first, so Retry.Exponential(5) means at most five executions.

public sealed record Retry : IEquatable<Retry>
Inheritance
Retry
Implements
Inherited Members

Properties

BaseDelay

The wait for Fixed, or the first one for Exponential.

Kind

Which formula computes the wait between attempts.

MaxAttempts

Total attempts allowed, including the first. Minimum 1.

MaxDelay

Ceiling on the computed wait.

None

The first failure is final; the job goes straight to Dead.

Methods

Exponential(int, TimeSpan?, TimeSpan?)

A policy whose wait doubles after each failure, up to a ceiling.

Fixed(TimeSpan, int)

A policy that waits the same delay before every retry.

NextDelay(int)

Delay before the next attempt, given that attempt number attempt (1-based) just failed. Returns null when attempts are exhausted and the job must be dead-lettered.