A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/tasks/docs/creating-queues below:

Create Cloud Tasks queues | Cloud Tasks Documentation

Skip to main content Create Cloud Tasks queues

Stay organized with collections Save and categorize content based on your preferences.

This page describes how to create Cloud Tasks queues. When tasks are added to a queue, the queue dispatches them and makes sure they are reliably processed by a service, also known as a worker.

Note the following:

Create a queue

You can create a queue in the following ways:

Note: If you are configuring routing for an App Engine queue and you don't explicitly set the target service that contains the appropriate worker, the default service is used. For more information, see Configure Cloud Tasks queues. Console
  1. In the Google Cloud console, go to the Cloud Tasks > Queues page.

    Go to Queues

  2. Click add_box Create queue.

  3. Enter a Queue name—for example, my-queue.

  4. In the Region list, select a supported location where the queue will run—for example, asia-south1.

    If your organization restricts resource location and you want to create your queue in either us-central1 or us-central2, the organization policy must allow queue creation in both us-central1 and us-central2 (even if you only need a queue in one of those regions).

  5. Optionally, you can further configure your queue.

  6. Click Create.

gcloud

Use the gcloud tasks queues create command to create your queue:

  gcloud tasks queues create QUEUE_ID \
      --location=LOCATION

Replace the following:

Other flags for the gcloud CLI command let you configure rate limits, retry options, queue types, and more.

REST API

To create a queue, use the projects.locations.queues.create method.

Before using any of the request data, make the following replacements:

Other configurable properties for the Queue resource include rate limits, retry options, queue types, and more.

Request JSON body:

{
  "name": "projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID"
}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login , or by using Cloud Shell, which automatically logs you into the gcloud CLI . You can check the currently active account by running gcloud auth list.

Save the request body in a file named request.json. Run the following command in the terminal to create or overwrite this file in the current directory:

cat > request.json << 'EOF'
{
  "name": "projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID"
}
EOF

Then execute the following command to send your REST request:

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://cloudtasks.googleapis.com/v2/projects/PROJECT_ID/locations/LOCATION/queues"
PowerShell (Windows) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login . You can check the currently active account by running gcloud auth list.

Save the request body in a file named request.json. Run the following command in the terminal to create or overwrite this file in the current directory:

@'
{
  "name": "projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID"
}
'@  | Out-File -FilePath request.json -Encoding utf8

Then execute the following command to send your REST request:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `


-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://cloudtasks.googleapis.com/v2/projects/PROJECT_ID/locations/LOCATION/queues" | Select-Object -Expand Content
APIs Explorer (browser)

Copy the request body and open the method reference page. The APIs Explorer panel opens on the right side of the page. You can interact with this tool to send requests. Paste the request body in this tool, complete any other required fields, and click Execute.

If successful, the response body contains a newly created instance of Queue:

{
  "name": "projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID",
  "rateLimits": {
    "maxDispatchesPerSecond": 500,
    "maxBurstSize": 100,
    "maxConcurrentDispatches": 1000
  },
  "retryConfig": {
    "maxAttempts": 100,
    "minBackoff": "0.100s",
    "maxBackoff": "3600s",
    "maxDoublings": 16
  },
  "state": "RUNNING"
}

It can take a few minutes for a newly created queue to be available.

Describe your queue

You can confirm that your queue was created successfully in the following ways:

Console
  1. In the Google Cloud console, go to the Cloud Tasks > Queues page.

    Go to Queues

    A green checkmark check_circle should indicate that your queue is running.

  2. For more details, click the name of the queue, and then click the Configuration tab.

gcloud

Use the gcloud tasks queues describe command to verify that your queue was created successfully:

gcloud tasks queues describe QUEUE_ID \
    --location=LOCATION

Replace the following:

The output should be similar to the following:

name: projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID
rateLimits:
  maxBurstSize: 100
  maxConcurrentDispatches: 1000
  maxDispatchesPerSecond: 500.0
retryConfig:
  maxAttempts: 100
  maxBackoff: 3600s
  maxDoublings: 16
  minBackoff: 0.100s
state: RUNNING
REST API

To retrieve a queue, use the projects.locations.queues.get method.

Before using any of the request data, make the following replacements:

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login , or by using Cloud Shell, which automatically logs you into the gcloud CLI . You can check the currently active account by running gcloud auth list.

Execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://cloudtasks.googleapis.com/v2/projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID"
PowerShell (Windows) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login . You can check the currently active account by running gcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `


-Method GET `
-Headers $headers `
-Uri "https://cloudtasks.googleapis.com/v2/projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID" | Select-Object -Expand Content
APIs Explorer (browser)

Open the method reference page. The APIs Explorer panel opens on the right side of the page. You can interact with this tool to send requests. Complete any required fields and click Execute.

If successful, the response body contains an instance of Queue:

{
  "name": "projects/PROJECT_ID/locations/LOCATION/queues/QUEUE_ID",
  "rateLimits": {
    "maxDispatchesPerSecond": 500,
    "maxBurstSize": 100,
    "maxConcurrentDispatches": 1000
  },
  "retryConfig": {
    "maxAttempts": 100,
    "minBackoff": "0.100s",
    "maxBackoff": "3600s",
    "maxDoublings": 16
  },
  "state": "RUNNING"
}
Troubleshoot creating a queue Note: Logging for your queue is not enabled by default. For information on enabling logging, see Use Cloud Logging with queues.

If you don't see the expected output, you can try the following:

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["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-08-07 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4