# Managed Service for Apache Kafka API v1 API - Class TaskRetryPolicy (1.0.0-beta08)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.0.0-beta08 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/latest/Google.Cloud.ManagedKafka.V1.TaskRetryPolicy)
- [1.0.0-beta07](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/1.0.0-beta07/Google.Cloud.ManagedKafka.V1.TaskRetryPolicy)

    public sealed class TaskRetryPolicy : IMessage<TaskRetryPolicy>, IEquatable<TaskRetryPolicy>, IDeepCloneable<TaskRetryPolicy>, IBufferMessage, IMessage

Reference documentation and code samples for the Managed Service for Apache Kafka API v1 API class TaskRetryPolicy.

Task Retry Policy is implemented on a best-effort
basis.
Retry delay will be exponential based on provided minimum and maximum
backoffs. <https://en.wikipedia.org/wiki/Exponential_backoff>.
Note that the delay between consecutive task restarts may not always
precisely match the configured settings. This can happen when the
ConnectCluster is in rebalancing state or if the ConnectCluster is
unresponsive etc. The default values for minimum and maximum backoffs are
60 seconds and 30 minutes respectively.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> TaskRetryPolicy

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TaskRetryPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/latest/Google.Cloud.ManagedKafka.V1.TaskRetryPolicy), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TaskRetryPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/latest/Google.Cloud.ManagedKafka.V1.TaskRetryPolicy), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TaskRetryPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/latest/Google.Cloud.ManagedKafka.V1.TaskRetryPolicy), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.ManagedKafka.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/latest/Google.Cloud.ManagedKafka.V1)

## Assembly

Google.Cloud.ManagedKafka.V1.dll

## Constructors

### TaskRetryPolicy()

    public TaskRetryPolicy()

### TaskRetryPolicy(TaskRetryPolicy)

    public TaskRetryPolicy(TaskRetryPolicy other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/latest/Google.Cloud.ManagedKafka.V1.TaskRetryPolicy` |

## Properties

### MaximumBackoff

    public Duration MaximumBackoff { get; set; }

Optional. The maximum amount of time to wait before retrying a failed task.
This sets an upper bound for the backoff delay.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### MinimumBackoff

    public Duration MinimumBackoff { get; set; }

Optional. The minimum amount of time to wait before retrying a failed task.
This sets a lower bound for the backoff delay.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |