Azure

Queue Storage

Overview

Azure Queue Storage provides reliable messaging for asynchronous communication between application components. It enables you to decouple workloads, scale services, and implement robust, fault‑tolerant architectures.

Getting Started

To create a queue, you can use the Azure portal, Azure CLI, PowerShell, or any supported SDK.

# Azure CLI
az storage queue create --name myqueue --account-name mystorageaccount

Core Concepts

REST API

All operations are performed over HTTPS. Example to insert a message:

PUT https://myaccount.queue.core.windows.net/myqueue/messages?timeout=30
Content-Type: text/plain

Hello, Azure Queue!

Refer to the official REST API reference for full details.

SDK Samples

C# (.NET)

using Azure.Storage.Queues;
var queueClient = new QueueClient(connectionString, "myqueue");
await queueClient.CreateIfNotExistsAsync();
await queueClient.SendMessageAsync("Hello, World!");

Python

from azure.storage.queue import QueueServiceClient
service = QueueServiceClient.from_connection_string(conn_str)
queue = service.get_queue_client("myqueue")
queue.create_queue()
queue.send_message("Hello, Python!")

JavaScript (Node.js)

const { QueueServiceClient } = require("@azure/storage-queue");
const client = QueueServiceClient.fromConnectionString(connStr);
const queueClient = client.getQueueClient("myqueue");
await queueClient.create();
await queueClient.sendMessage("Hello, Node!");

Best Practices

FAQ

What is the maximum size of a queue? A queue can hold an unlimited number of messages, limited only by the storage account capacity.

How long can a message be hidden? Up to 7 days (604,800 seconds) using the visibility timeout.