Class PollyRetryOptions
- Namespace
- Excalibur.Dispatch.Resilience.Polly
- Assembly
- Excalibur.Dispatch.Resilience.Polly.dll
Configuration options for retry policy with jitter support.
public sealed class PollyRetryOptions
- Inheritance
-
PollyRetryOptions
- Inherited Members
- Extension Methods
Properties
BackoffStrategy
Gets or sets backoff strategy for retry delays.
public BackoffStrategy BackoffStrategy { get; set; }
Property Value
- BackoffStrategy
The algorithm used to compute successive retry delays. Defaults to Exponential.
BaseDelay
Gets or sets base delay between retry attempts.
public TimeSpan BaseDelay { get; set; }
Property Value
- TimeSpan
The baseline delay applied before backoff strategies.
EnableDetailedLogging
Gets or sets a value indicating whether to log detailed retry information.
public bool EnableDetailedLogging { get; set; }
Property Value
MaxDelay
Gets or sets maximum delay cap for any single retry.
public TimeSpan? MaxDelay { get; set; }
Property Value
- TimeSpan?
The upper bound applied to any individual retry delay. Defaults to one minute.
MaxRetryAttempts
Gets or sets maximum number of retry attempts.
[Range(0, 100)]
public int MaxRetryAttempts { get; set; }
Property Value
- int
The current MaxRetryAttempts value.
ShouldRetry
Gets or sets a predicate that selects which exceptions are retried.
public Func<Exception, bool>? ShouldRetry { get; set; }
Property Value
- Func<Exception, bool>
A predicate returning true for exceptions that may be retried, or null to use the default recognized-transient/uncertain policy with cancellation and tenant-isolation exclusions.
Remarks
When this is null, only recognized transient failures and uncertain delivery acceptance are retried, excluding cancellation and the framework exclusions below. Unknown faults are propagated.
An explicit predicate may select attempt-local cancellation when the caller remains active. Caller cancellation still terminates the pipeline. The predicate is combined with the framework's exclusions using AND, so it cannot re-enable a tenant-isolation violation.
Exceptions that are never retried regardless of this predicate: TenantIsolationViolationException, because a request that escaped its tenant boundary will escape it identically on every attempt, and retrying multiplies the exposure instead of recovering from it.
UseJitter
Gets or sets a value indicating whether to add jitter to retry delays.
public bool UseJitter { get; set; }