public sealed class RateLimits : IMessage<RateLimits>, IEquatable<RateLimits>, IDeepCloneable<RateLimits>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Tasks v2beta3 API class RateLimits.
Rate limits.
This message determines the maximum rate that tasks can be dispatched by a
queue, regardless of whether the dispatch is a first task attempt or a retry.
Note: The debugging command,
[RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask], will run a task
even if the queue has reached its
[RateLimits][google.cloud.tasks.v2beta3.RateLimits].
Max burst size limits how fast tasks in queue are processed when
many tasks are in the queue and the rate is high. This field
allows the queue to have a high rate so processing starts shortly
after a task is enqueued, but still limits resource usage when
many tasks are enqueued in a short period of time.
The token bucket
algorithm is used to control the rate of task dispatches. Each
queue has a token bucket that holds tokens, up to the maximum
specified by max_burst_size. Each time a task is dispatched, a
token is removed from the bucket. Tasks will be dispatched until
the queue's bucket runs out of tokens. The bucket will be
continuously refilled with new tokens based on
[max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
The default value of max_burst_size is picked by Cloud Tasks
based on the value of
[max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
The maximum value of max_burst_size is 500.
For App Engine queues that were created or updated using
queue.yaml/xml, max_burst_size is equal to
bucket_size.
If
[UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called
on a queue without explicitly setting a value for max_burst_size,
max_burst_size value will get updated if
[UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is
updating
[max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
The maximum number of concurrent tasks that Cloud Tasks allows
to be dispatched for this queue. After this threshold has been
reached, Cloud Tasks stops dispatching tasks until the number of
concurrent requests decreases.
If unspecified when the queue is created, Cloud Tasks will pick the
default.
[[["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-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eRateLimits\u003c/code\u003e class in the Google Cloud Tasks v2beta3 API defines the maximum rate at which tasks can be dispatched from a queue.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMaxBurstSize\u003c/code\u003e controls how quickly tasks are processed when the queue is full, using a token bucket algorithm with a maximum value of 500.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMaxConcurrentDispatches\u003c/code\u003e sets the upper limit for tasks that can be simultaneously dispatched, with a maximum value of 5,000.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMaxDispatchesPerSecond\u003c/code\u003e determines the maximum rate at which tasks are dispatched from a queue, with a maximum allowed value of 500 for App Engine queues.\u003c/p\u003e\n"],["\u003cp\u003eThe debugging command \u003ccode\u003eRunTask\u003c/code\u003e will still execute a task, even if the queue has reached its defined rate limits.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Tasks v2beta3 API - Class RateLimits (3.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.RateLimits)\n- [3.0.0-beta06](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/3.0.0-beta06/Google.Cloud.Tasks.V2Beta3.RateLimits)\n- [2.0.0-beta08](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/2.0.0-beta08/Google.Cloud.Tasks.V2Beta3.RateLimits) \n\n public sealed class RateLimits : IMessage\u003cRateLimits\u003e, IEquatable\u003cRateLimits\u003e, IDeepCloneable\u003cRateLimits\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Tasks v2beta3 API class RateLimits.\n\nRate limits.\n\nThis message determines the maximum rate that tasks can be dispatched by a\nqueue, regardless of whether the dispatch is a first task attempt or a retry.\n\nNote: The debugging command,\n\\[RunTask\\]\\[google.cloud.tasks.v2beta3.CloudTasks.RunTask\\], will run a task\neven if the queue has reached its\n\\[RateLimits\\]\\[google.cloud.tasks.v2beta3.RateLimits\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RateLimits \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RateLimits](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.RateLimits), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RateLimits](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.RateLimits), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RateLimits](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.RateLimits), [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.Tasks.V2Beta3](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3)\n\nAssembly\n--------\n\nGoogle.Cloud.Tasks.V2Beta3.dll\n\nConstructors\n------------\n\n### RateLimits()\n\n public RateLimits()\n\n### RateLimits(RateLimits)\n\n public RateLimits(RateLimits other)\n\nProperties\n----------\n\n### MaxBurstSize\n\n public int MaxBurstSize { get; set; }\n\nThe max burst size.\n\nMax burst size limits how fast tasks in queue are processed when\nmany tasks are in the queue and the rate is high. This field\nallows the queue to have a high rate so processing starts shortly\nafter a task is enqueued, but still limits resource usage when\nmany tasks are enqueued in a short period of time.\n\nThe [token bucket](https://wikipedia.org/wiki/Token_Bucket)\nalgorithm is used to control the rate of task dispatches. Each\nqueue has a token bucket that holds tokens, up to the maximum\nspecified by `max_burst_size`. Each time a task is dispatched, a\ntoken is removed from the bucket. Tasks will be dispatched until\nthe queue's bucket runs out of tokens. The bucket will be\ncontinuously refilled with new tokens based on\n\\[max_dispatches_per_second\\]\\[google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second\\].\n\nThe default value of `max_burst_size` is picked by Cloud Tasks\nbased on the value of\n\\[max_dispatches_per_second\\]\\[google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second\\].\n\nThe maximum value of `max_burst_size` is 500.\n\nFor App Engine queues that were created or updated using\n`queue.yaml/xml`, `max_burst_size` is equal to\n[bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).\nIf\n\\[UpdateQueue\\]\\[google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue\\] is called\non a queue without explicitly setting a value for `max_burst_size`,\n`max_burst_size` value will get updated if\n\\[UpdateQueue\\]\\[google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue\\] is\nupdating\n\\[max_dispatches_per_second\\]\\[google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second\\].\n\n### MaxConcurrentDispatches\n\n public int MaxConcurrentDispatches { get; set; }\n\nThe maximum number of concurrent tasks that Cloud Tasks allows\nto be dispatched for this queue. After this threshold has been\nreached, Cloud Tasks stops dispatching tasks until the number of\nconcurrent requests decreases.\n\nIf unspecified when the queue is created, Cloud Tasks will pick the\ndefault.\n\nThe maximum allowed value is 5,000.\n\nThis field has the same meaning as\n[max_concurrent_requests in\nqueue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).\n\n### MaxDispatchesPerSecond\n\n public double MaxDispatchesPerSecond { get; set; }\n\nThe maximum rate at which tasks are dispatched from this queue.\n\nIf unspecified when the queue is created, Cloud Tasks will pick the\ndefault.\n\n- For \\[App Engine queues\\]\\[google.cloud.tasks.v2beta3.AppEngineHttpQueue\\], the maximum allowed value is 500.\n\nThis field has the same meaning as\n[rate in\nqueue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate)."]]