Azure Queue Storage is a service that stores large numbers of messages that can be accessed from anywhere in the world via HTTP or HTTPS. A single queue message can be up to 64 KB in size. Queue Storage is used to build applications with decoupled components.

Queue Storage offers several advantages:

Key Concepts

Queues

A queue is a collection of messages. Each queue is scoped to a storage account. Messages within a queue can be accessed by any client that has authorization to the storage account.

Messages

A message is a piece of data that you want to store in a queue. A message can be any sequence of UTF-8 data up to 64 KB. The visibility timeout determines how long a message is invisible in the queue after being dequeued.

Note: Messages in Azure Queue Storage are not intended for complex message patterns like publish/subscribe. For those scenarios, consider Azure Service Bus Queues or Topics.

Use Cases

Working with Queue Storage

Creating a Queue

You can create a queue using the Azure portal, Azure CLI, PowerShell, or SDKs.

Using Azure CLI:

az storage queue create --name myqueue --account-name mystorageaccount --account-key 

Adding a Message

Messages are added to the end of the queue.

Using Azure CLI:

az storage message put --queue-name myqueue --content "This is my first message." --account-name mystorageaccount --account-key 

Getting and Dequeuing Messages

When a message is dequeued, it becomes invisible to other clients for a specified period (visibility timeout). If the message is not deleted within the timeout, it reappears in the queue for another client to process.

Using Azure CLI (to get and hide for 30 seconds):

az storage message get --queue-name myqueue --visibility-timeout 30 --account-name mystorageaccount --account-key 

Deleting a Message

Once a message has been successfully processed, it must be explicitly deleted.

Using Azure CLI (requires the message's pop receipt):

az storage message delete --queue-name myqueue --pop-receipt  --message-id  --account-name mystorageaccount --account-key 

Performance and Scalability

Azure Queue Storage is designed for high throughput and massive scale. It's suitable for applications that need to process millions of messages.

Pricing

Queue Storage pricing is based on the volume of data stored and the number of operations performed. For detailed information, please refer to the Azure Pricing page.

For more in-depth information, explore the following resources: