Class RegistrationRetryOptions

Namespace
Cratis.Chronicle.Registrations
Assembly
Cratis.Chronicle.dll

Represents how a client retries registering its artifacts when the kernel does not accept them.

public class RegistrationRetryOptions
Inheritance
RegistrationRetryOptions
Inherited Members
Extension Methods

Remarks

Registering is what a host does on its way up, so a registration that fails takes the host with it. A kernel that is merely busy - catching up a newly added read model over a large event log, say - answers late rather than wrongly, and a host that dies on that answer comes back and asks again, adding its whole registration to the queue it was already waiting on. Retrying in place instead lets the client wait out a busy kernel. Registration is idempotent, so a retry costs the kernel nothing beyond the comparison it already does; a kernel that is genuinely wrong keeps failing and the host still ends up down, just after the attempts are spent rather than on the first.

Constructors

RegistrationRetryOptions()

public RegistrationRetryOptions()

Properties

InitialDelay

Gets or sets how long to wait after the first failed attempt. Each further attempt doubles it, jittered, up to MaximumDelay. Defaults to two seconds.

public TimeSpan InitialDelay { get; set; }

Property Value

TimeSpan

MaxAttempts

Gets or sets how many times registering all artifacts is attempted before the failure is surfaced. One disables retrying. Defaults to five.

public int MaxAttempts { get; set; }

Property Value

int

MaximumDelay

Gets or sets the upper bound for the wait between attempts. Defaults to thirty seconds.

public TimeSpan MaximumDelay { get; set; }

Property Value

TimeSpan