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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[],[],null,["# Managed Service for Apache Kafka API v1 API - Class TaskRetryPolicy (1.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/latest/Google.Cloud.ManagedKafka.V1.TaskRetryPolicy)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/1.0.0-beta06/Google.Cloud.ManagedKafka.V1.TaskRetryPolicy) \n\n public sealed class TaskRetryPolicy : IMessage\u003cTaskRetryPolicy\u003e, IEquatable\u003cTaskRetryPolicy\u003e, IDeepCloneable\u003cTaskRetryPolicy\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Managed Service for Apache Kafka API v1 API class TaskRetryPolicy.\n\nTask Retry Policy is implemented on a best-effort\nbasis.\nRetry delay will be exponential based on provided minimum and maximum\nbackoffs. \u003chttps://en.wikipedia.org/wiki/Exponential_backoff\u003e.\nNote that the delay between consecutive task restarts may not always\nprecisely match the configured settings. This can happen when the\nConnectCluster is in rebalancing state or if the ConnectCluster is\nunresponsive etc. The default values for minimum and maximum backoffs are\n60 seconds and 30 minutes respectively. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TaskRetryPolicy \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TaskRetryPolicy](/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/latest/Google.Cloud.ManagedKafka.V1.TaskRetryPolicy), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TaskRetryPolicy](/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](/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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.ManagedKafka.V1](/dotnet/docs/reference/Google.Cloud.ManagedKafka.V1/latest/Google.Cloud.ManagedKafka.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.ManagedKafka.V1.dll\n\nConstructors\n------------\n\n### TaskRetryPolicy()\n\n public TaskRetryPolicy()\n\n### TaskRetryPolicy(TaskRetryPolicy)\n\n public TaskRetryPolicy(TaskRetryPolicy other)\n\nProperties\n----------\n\n### MaximumBackoff\n\n public Duration MaximumBackoff { get; set; }\n\nOptional. The maximum amount of time to wait before retrying a failed task.\nThis sets an upper bound for the backoff delay.\n\n### MinimumBackoff\n\n public Duration MinimumBackoff { get; set; }\n\nOptional. The minimum amount of time to wait before retrying a failed task.\nThis sets a lower bound for the backoff delay."]]