SALES: 1-800-867-1380

RetryExponential Class

Represents an implementation of a retry policy. For each time the messaging operation must be retried, the delay between retries grows in a staggered, exponential manner.


Namespace:  Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public sealed class RetryExponential : RetryPolicy

The RetryExponential type exposes the following members.

Public methodRetryExponential(TimeSpan, TimeSpan, Int32)Initializes a new instance of the RetryExponential class.
Public methodRetryExponential(TimeSpan, TimeSpan, TimeSpan, TimeSpan, Int32) Obsolete. Initializes a new instance of the RetryExponential class.

Public propertyDeltaBackoffGets or sets the backoff interval associated with the retry.
Public propertyMaximumBackoffGets or sets the maximum backoff interval.
Public propertyMaxRetryCountGets or sets the maximum number of allowed retries.
Public propertyMinimalBackoffGets or sets the minimum backoff interval.
Public propertyTerminationTimeBufferGets or sets the termination time buffer associated with the retry.

Public methodCloneCreates a new copy of this instance. (Overrides RetryPolicy.Clone().)
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)

The retry policy has the following characteristics:

  • The policy always honors the OperationTimeout value, so that the retry operation terminates if the next retry interval exceeds the operation time.

  • The policy only retries when the IsTransient property is true.

  • The policy should delay an additional 10 seconds if the exception is ServerBusyException.

  • The retry policy calculation is performed up to the MaxRetryCount property value, and each calculation follows a staggered exponential curve.

  • If possible, you should change the OperationTimeout value to control how long each retry should wait, rather than supplying a custom RetryExponential policy instance. The default policy RetryPolicy.Default already uses a Microsoft.ServiceBus.RetryExponential instance with a reasonable default value that interacts with the operation timeout value.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft