- Resource: Queue
- AppEngineHttpQueue
- RateLimits
- RetryConfig
- State
- StackdriverLoggingConfig
- Type
- QueueStats
- Methods
Resource: Queue
A queue is a container of related tasks. Queues are configured to manage how those tasks are dispatched. Configurable properties include rate limits, retry options, queue types, and others.
JSON representation | |
---|---|
{ "name": string, "rateLimits": { object ( |
Fields | |
---|---|
name |
Caller-specified and required in The queue name. The queue name must have the following format:
|
rateLimits |
Rate limits for task dispatches.
The queue's actual dispatch rate is the result of:
|
retryConfig |
Settings that determine the retry behavior.
|
state |
Output only. The state of the queue.
|
purgeTime |
Output only. The last time this queue was purged. All tasks that were A queue can be purged using Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
taskTtl |
The maximum amount of time that a task will be retained in this queue. Queues created by Cloud Tasks have a default The A duration in seconds with up to nine fractional digits, terminated by ' |
tombstoneTtl |
The task tombstone time to live (TTL). After a task is deleted or executed, the task's tombstone is retained for the length of time specified by Queues created by Cloud Tasks have a default A duration in seconds with up to nine fractional digits, terminated by ' |
stackdriverLoggingConfig |
Configuration options for writing logs to Stackdriver Logging. If this field is unset, then no logs are written. |
type |
Immutable. The type of a queue (push or pull).
|
stats |
Output only. The realtime, informational statistics for a queue. In order to receive the statistics the caller should include this field in the FieldMask. |
appEngineHttpQueue |
|
AppEngineHttpQueue
App Engine HTTP queue.
The task will be delivered to the App Engine application hostname specified by its AppEngineHttpQueue
and AppEngineHttpRequest
. The documentation for AppEngineHttpRequest
explains how the task's host URL is constructed.
Using AppEngineHttpQueue
requires appengine.applications.get
Google IAM permission for the project and the following scope:
https://www.googleapis.com/auth/cloud-platform
JSON representation | |
---|---|
{
"appEngineRoutingOverride": {
object ( |
Fields | |
---|---|
appEngineRoutingOverride |
Overrides for the If set, |
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, tasks.run
, will run a task even if the queue has reached its RateLimits
.
JSON representation | |
---|---|
{ "maxDispatchesPerSecond": number, "maxBurstSize": integer, "maxConcurrentDispatches": integer } |
Fields | |
---|---|
maxDispatchesPerSecond |
The maximum rate at which tasks are dispatched from this queue. If unspecified when the queue is created, Cloud Tasks will pick the default.
This field has the same meaning as rate in queue.yaml/xml. |
maxBurstSize |
The max burst size. 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 The default value of The maximum value of For App Engine queues that were created or updated using |
maxConcurrentDispatches |
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. The maximum allowed value is 5,000. This field has the same meaning as max_concurrent_requests in queue.yaml/xml. |
RetryConfig
Retry config.
These settings determine when a failed task attempt is retried.
JSON representation | |
---|---|
{ "maxAttempts": integer, "maxRetryDuration": string, "minBackoff": string, "maxBackoff": string, "maxDoublings": integer } |
Fields | |
---|---|
maxAttempts |
Number of attempts per task. Cloud Tasks will attempt the task If unspecified when the queue is created, Cloud Tasks will pick the default. -1 indicates unlimited attempts. This field has the same meaning as task_retry_limit in queue.yaml/xml. |
maxRetryDuration |
If positive, If zero, then the task age is unlimited. If unspecified when the queue is created, Cloud Tasks will pick the default.
This field has the same meaning as taskAgeLimit in queue.yaml/xml. A duration in seconds with up to nine fractional digits, terminated by ' |
minBackoff |
A task will be If unspecified when the queue is created, Cloud Tasks will pick the default.
This field has the same meaning as min_backoff_seconds in queue.yaml/xml. A duration in seconds with up to nine fractional digits, terminated by ' |
maxBackoff |
A task will be If unspecified when the queue is created, Cloud Tasks will pick the default.
This field has the same meaning as max_backoff_seconds in queue.yaml/xml. A duration in seconds with up to nine fractional digits, terminated by ' |
maxDoublings |
The time between retries will double A task's retry interval starts at For example, if If unspecified when the queue is created, Cloud Tasks will pick the default. This field has the same meaning as maxDoublings in queue.yaml/xml. |
State
State of the queue.
Enums | |
---|---|
STATE_UNSPECIFIED |
Unspecified state. |
RUNNING |
The queue is running. Tasks can be dispatched. If the queue was created using Cloud Tasks and the queue has had no activity (method calls or task dispatches) for 30 days, the queue may take a few minutes to re-activate. Some method calls may return |
PAUSED |
Tasks are paused by the user. If the queue is paused then Cloud Tasks will stop delivering tasks from it, but more tasks can still be added to it by the user. |
DISABLED |
The queue is disabled. A queue becomes When a queue is disabled, tasks can still be added to a queue but the tasks are not dispatched. To permanently delete this queue and all of its tasks, call |
StackdriverLoggingConfig
Configuration options for writing logs to Stackdriver Logging.
JSON representation | |
---|---|
{ "samplingRatio": number } |
Fields | |
---|---|
samplingRatio |
Specifies the fraction of operations to write to Stackdriver Logging. This field may contain any value between 0.0 and 1.0, inclusive. 0.0 is the default and means that no operations are logged. |
Type
The type of the queue.
Enums | |
---|---|
TYPE_UNSPECIFIED |
Default value. |
PULL |
A pull queue. |
PUSH |
A push queue. |
QueueStats
Statistics for a queue.
JSON representation | |
---|---|
{ "tasksCount": string, "oldestEstimatedArrivalTime": string, "executedLastMinuteCount": string, "concurrentDispatchesCount": string, "effectiveExecutionRate": number } |
Fields | |
---|---|
tasksCount |
Output only. An estimation of the number of tasks in the queue, that is, the tasks in the queue that haven't been executed, the tasks in the queue which the queue has dispatched but has not yet received a reply for, and the failed tasks that the queue is retrying. |
oldestEstimatedArrivalTime |
Output only. An estimation of the nearest time in the future where a task in the queue is scheduled to be executed. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
executedLastMinuteCount |
Output only. The number of tasks that the queue has dispatched and received a reply for during the last minute. This variable counts both successful and non-successful executions. |
concurrentDispatchesCount |
Output only. The number of requests that the queue has dispatched but has not received a reply for yet. |
effectiveExecutionRate |
Output only. The current maximum number of tasks per second executed by the queue. The maximum value of this variable is controlled by the RateLimits of the Queue. However, this value could be less to avoid overloading the endpoints tasks in the queue are targeting. |
Methods |
|
---|---|
|
Creates a queue. |
|
Deletes a queue. |
|
Gets a queue. |
|
Gets the access control policy for a Queue . |
|
Lists queues. |
|
Updates a queue. |
|
Pauses the queue. |
|
Purges a queue by deleting all of its tasks. |
|
Resume a queue. |
|
Sets the access control policy for a Queue . |
|
Returns permissions that a caller has on a Queue . |