Class ReconnectOptions
- Namespace
- DatabentoDotNet.Extensions.Hosting
- Assembly
- DatabentoDotNet.Extensions.Hosting.dll
How a session recovers from a dropped connection.
public sealed class ReconnectOptions
- Inheritance
-
ReconnectOptions
- Inherited Members
Properties
Enabled
Whether to reconnect at all. Defaults to true.
public bool Enabled { get; set; }
Property Value
InitialDelay
The first backoff delay, as an ISO-8601 duration. Defaults to PT1S.
public string InitialDelay { get; set; }
Property Value
Remarks
Must not exceed MaxDelay, and that is checked at startup. Each value parses cleanly on its own and it is the pair together that is meaningless — a backoff cannot start above the ceiling it backs off toward — so the failure is reported against this key, since this is the one that has to move. Both defaults satisfy it; a configuration that overrides only one of them is where it bites.
MaxAttempts
How many consecutive failures to tolerate before giving up. Defaults to 10.
public int MaxAttempts { get; set; }
Property Value
Remarks
Consecutive, and the counter resets on a successful start — so a gateway that flaps every ten minutes reconnects indefinitely. That is deliberate: the alternative silently stops a worker overnight. Every reconnect starts a newly billed session, which is what this bound is really bounding.
MaxDelay
The backoff ceiling, as an ISO-8601 duration. Defaults to PT30S.
public string MaxDelay { get; set; }
Property Value
Remarks
Must not be less than InitialDelay — see that property. The startup
failure names InitialDelay rather than this key, because raising the ceiling to meet
a deliberately long first delay is the rarer of the two intentions.