Skip to content
Get Started for Free

Queue Storage

Azure Queue Storage is a messaging service for storing large numbers of messages that can be accessed from anywhere over HTTP or HTTPS. It is commonly used to decouple application components and build asynchronous processing workflows. Queue Storage is useful for buffering work items between producers and consumers.

LocalStack for Azure allows you to build and test Queue Storage workflows in your local environment. The supported APIs are available on our API Coverage section, which provides information on the extent of Queue Storage’s integration with LocalStack.

This guide is designed for users new to Queue Storage and assumes basic knowledge of the Azure CLI and our azlocal wrapper script.

Start your LocalStack container using your preferred method. Then start CLI interception:

Terminal window
azlocal start_interception

Create a resource group to contain your storage resources:

Terminal window
az group create \
--name rg-queue-demo \
--location westeurope
Output
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-queue-demo",
"location": "westeurope",
"managedBy": null,
"name": "rg-queue-demo",
"properties": {
"provisioningState": "Succeeded"
},
"tags": null,
"type": "Microsoft.Resources/resourceGroups"
}

Create a storage account for Queue Storage:

Terminal window
az storage account create \
--name stqueuedemols \
--resource-group rg-queue-demo \
--location westeurope \
--sku Standard_LRS
Output
{
...
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-queue-demo/providers/Microsoft.Storage/storageAccounts/stqueuedemols",
...
"name": "stqueuedemols",
...
"placement": null,
"primaryEndpoints": {
"blob": "https://stqueuedemolsblob.localhost.localstack.cloud:4566",
...
"queue": "https://stqueuedemolsqueue.localhost.localstack.cloud:4566",
...
},
....
}

Use the storage account connection string for queue operations:

Terminal window
CONNECTION_STRING=$(az storage account show-connection-string \
--name stqueuedemols \
--resource-group rg-queue-demo \
--query connectionString -o tsv)

Create a queue:

Terminal window
az storage queue create \
--name app-queue \
--connection-string "$CONNECTION_STRING"
Output
{
"created": true
}

Verify the queue exists:

Terminal window
az storage queue exists \
--name app-queue \
--connection-string "$CONNECTION_STRING"
Output
{
"exists": true
}

List queues in the storage account:

Terminal window
az storage queue list \
--connection-string "$CONNECTION_STRING"
Output
[
{
"approximateMessageCount": null,
"metadata": null,
"name": "app-queue"
}
]

Add a message to the queue:

Terminal window
az storage message put \
--queue-name app-queue \
--content "hello-from-localstack" \
--connection-string "$CONNECTION_STRING"
Output
{
"content": "hello-from-localstack",
...
"id": "a253ff4a-7b9c-434e-9c33-deae3070193c",
...
}

Peek messages without consuming them:

Terminal window
az storage message peek \
--queue-name app-queue \
--connection-string "$CONNECTION_STRING"
Output
[
{
"content": "hello-from-localstack",
...
"id": "a253ff4a-7b9c-434e-9c33-deae3070193c",
"insertionTime": "2026-02-27T07:45:14+00:00",
...
}
]
OperationImplemented
Page 1 of 0
Was this page helpful?