Azure Documentation

Create an Azure Storage Queue

This tutorial guides you through the process of creating a new Azure Storage Queue using the Azure portal and Azure CLI. Queues are a robust messaging solution for reliable communication between application components.

Prerequisites

Note: When you create a storage account, a queue service endpoint is automatically available. You don't need to create a separate queue service.

Method 1: Using the Azure Portal

The Azure portal provides a user-friendly graphical interface to manage your Azure resources.

1

Sign in to the Azure portal

Navigate to https://portal.azure.com/ and sign in with your Azure account credentials.

2

Navigate to your Storage Account

In the Azure portal, search for and select "Storage accounts". Then, select the storage account where you want to create the queue.

3

Access the Queues Service

Under the "Data storage" section in your storage account's menu, select "Queues".

4

Create a Queue

Click the "+ Queue" button. A panel will appear on the right.

Enter a name for your queue in the "Name" field. Queue names must be lowercase, start with a letter, and can only contain letters and numbers. The maximum length is 63 characters.

Click "OK" to create the queue.

Your new queue will now appear in the list of queues for your storage account.

Method 2: Using Azure CLI

The Azure Command-Line Interface (CLI) is a powerful tool for managing Azure resources from your terminal.

Install Azure CLI

If you haven't already, install the Azure CLI by following the instructions for your operating system: Install the Azure CLI.

Log in to Azure

Open your terminal or command prompt and run:

az login

Follow the prompts to authenticate your account.

Set Your Subscription (if necessary)

If you have multiple Azure subscriptions, set the one you want to use:

az account set --subscription ""

Create the Queue

Use the following command to create a queue. Replace <your-storage-account-name> and <your-queue-name> with your actual values.

az storage queue create \
    --name <your-queue-name> \
    --account-name <your-storage-account-name>

Example:

az storage queue create \
    --name myappqueue \
    --account-name mystorageaccount123

The CLI will provide output indicating the success or failure of the operation.

Next Steps

Now that you have created an Azure Storage Queue, you can start adding messages to it. Explore the following topics:

Find code samples for Azure Storage Queues on GitHub.