Skip to content

RetryPolicy

Namespace: Hex1b

Assembly: Hex1b.dll

Backoff policy used by retrying transports such as .

csharp
public sealed class RetryPolicy

Inheritance

ObjectRetryPolicy

Properties

DefaultUnixSocket

Reasonable defaults for waiting on a UDS producer to come online: 200 ms initial, 1.5× backoff, capped at 2 s, infinite attempts.

Returns: RetryPolicy

csharp
public static RetryPolicy DefaultUnixSocket { get; }

InitialDelay

Initial delay before the second attempt.

Returns: TimeSpan

csharp
public TimeSpan InitialDelay { get; init; }

MaxAttempts

Maximum number of attempts before giving up. Zero means infinite (the default) — retries continue until the supplied is cancelled.

Returns: Int32

csharp
public int MaxAttempts { get; init; }

MaxDelay

Maximum delay between attempts.

Returns: TimeSpan

csharp
public TimeSpan MaxDelay { get; init; }

Multiplier

Multiplier applied to the delay after each failed attempt.

Returns: Double

csharp
public double Multiplier { get; init; }

OnAttemptFailed

Optional hook invoked after each failed attempt (before the delay).

Returns: Action<RetryAttemptFailedEventArgs>

csharp
public Action<RetryAttemptFailedEventArgs>? OnAttemptFailed { get; init; }

Released under the MIT License.