Class RetryExponential
- Namespace
- Microsoft.Azure.ServiceBus
- Assembly
- Microsoft.Azure.ServiceBus.dll
RetryPolicy implementation where the delay between retries will grow in a staggered exponential manner. RetryIntervals will be computed using a retryFactor which is a function of deltaBackOff (MaximumBackoff - MinimumBackoff) and MaximumRetryCount
public sealed class RetryExponential : RetryPolicy
- Inheritance
-
RetryExponential
- Inherited Members
Constructors
RetryExponential(TimeSpan, TimeSpan, int)
Returns a new RetryExponential retry policy object.
public RetryExponential(TimeSpan minimumBackoff, TimeSpan maximumBackoff, int maximumRetryCount)
Parameters
minimumBackoff
TimeSpanMinimum backoff interval.
maximumBackoff
TimeSpanMaximum backoff interval.
maximumRetryCount
int
Properties
DeltaBackoff
Gets or sets the backoff interval associated with the retry.
public TimeSpan DeltaBackoff { get; }
Property Value
- TimeSpan
The backoff interval associated with the retry.
MaxRetryCount
Gets or sets the maximum number of allowed retries.
public int MaxRetryCount { get; }
Property Value
- int
The maximum number of allowed retries.
MaximumBackoff
Gets or sets the maximum backoff interval.
public TimeSpan MaximumBackoff { get; }
Property Value
- TimeSpan
The maximum backoff interval.
MinimalBackoff
Minimum backoff interval.
public TimeSpan MinimalBackoff { get; }
Property Value
- TimeSpan
The minimum backoff interval.
Methods
OnShouldRetry(TimeSpan, int, out TimeSpan)
Called to see if a retry should be performed.
protected override bool OnShouldRetry(TimeSpan remainingTime, int currentRetryCount, out TimeSpan retryInterval)
Parameters
remainingTime
TimeSpanThe remaining time before the timeout expires.
currentRetryCount
intThe number of attempts that have been processed.
retryInterval
TimeSpanThe amount of time to delay before retry.