<PackageReference Include="Grpc.Net.Client" Version="2.67.0" />

Grpc.Net.Client.Configuration.RetryPolicy

public sealed class RetryPolicy : ConfigObject
The retry policy for outgoing calls.
public double? BackoffMultiplier { get; set; }

Gets or sets the backoff multiplier. The backoff will be multiplied by BackoffMultiplier after each retry attempt and will increase exponentially when the multiplier is greater than 1. This property is required and must be greater than 0.

public TimeSpan? InitialBackoff { get; set; }

Gets or sets the initial backoff. A randomized delay between 0 and the current backoff value will determine when the next retry attempt is made. This property is required and must be greater than zero.

The backoff will be multiplied by BackoffMultiplier after each retry attempt and will increase exponentially when the multiplier is greater than 1.

public int? MaxAttempts { get; set; }

Gets or sets the maximum number of call attempts. This value includes the original attempt. This property is required and must be greater than 1. This value is limited by MaxRetryAttempts.

public TimeSpan? MaxBackoff { get; set; }

Gets or sets the maximum backoff. The maximum backoff places an upper limit on exponential backoff growth. This property is required and must be greater than zero.

public IList<StatusCode> RetryableStatusCodes { get; }

Gets a collection of status codes which may be retried. At least one status code is required.

public RetryPolicy()

Initializes a new instance of the RetryPolicy class.