New to Claude Skills? Learn how to install them →

sickn33 on GitHub

Azure Queue Storage for Rust

Free

Manage Azure Queue messages seamlessly in Rust.

Get this skill

Free · Opens the source repo

What Azure Queue Storage for Rust does

The Azure Queue Storage library for Rust provides developers with the tools to interact with Azure's Queue Storage service. This library allows you to send, receive, and manage queue messages efficiently. It is particularly useful for applications that require reliable message queuing, enabling asynchronous communication between different components of your system. With this library, you can create and manage queues, peek at messages, and perform operations such as sending and deleting messages, all while adhering to Azure's security protocols.

To get started, you will need to install the official azure_storage_queue crate along with its dependencies, including azure_identity for authentication and tokio for asynchronous operations. The library supports role-based access control (RBAC), ensuring that your applications can securely interact with Azure resources. You can authenticate using DeveloperToolsCredential for local development and switch to ManagedIdentityCredential for production environments, maintaining best security practices.

The library's API is straightforward, with dedicated client types such as QueueServiceClient for account-level operations and QueueClient for queue-specific tasks. This separation of concerns allows for organized code and clear functionality when working with Azure Queue Storage. Additionally, the library provides comprehensive examples for common operations like sending and receiving messages, which can help developers quickly integrate queue functionality into their applications.

In summary, this skill is essential for Rust developers looking to implement Azure Queue Storage in their applications, providing a robust and secure method for managing message queues.

When to use it

Use this skill when your Rust application needs to send, receive, or manage messages in Azure Queue Storage.

When not to use it

This skill may not be suitable if you're not using Rust or if you require features from unofficial libraries not supported by this skill.

What you can build with it

Sending Messages to a Queue

Use the skill to send messages to an Azure Queue from your Rust application, facilitating communication between services.

Receiving Messages for Processing

Integrate the skill to receive and process messages from an Azure Queue, allowing your application to handle tasks asynchronously.

Managing Queue Operations

Utilize the skill to manage queues, including creating, deleting, and peeking at messages, ensuring efficient message handling.

How to install Azure Queue Storage for Rust

View source

1. Install with the skills CLI

npx skills add sickn33/agentic-awesome-skills/azure-storage-queue-rust --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by sickn33

Azure Queue Storage library for Rust

When to Use

Use this skill when you need azure Queue Storage library for Rust. Send, receive, and manage queue messages. Triggers: "queue storage rust", "QueueClient rust", "send message rust", "receive messages rust", "QueueServiceClient rust", "queue rust".

Client library for Azure Queue Storage — send, receive, and manage queue messages.

Use this skill when:

  • An app needs to send or receive messages from Azure Queue Storage in Rust
  • You need to create or manage queues
  • You need to peek, receive, or delete queue messages
  • You need RBAC-based auth for queue operations

IMPORTANT: Only use the official azure_storage_queue crate published by the azure-sdk crates.io user. Do NOT use unofficial or community crates. Official crates use underscores in names and none have version 0.21.0.

Installation

cargo add azure_storage_queue azure_identity azure_core tokio

If your code uses azure_core types directly, add azure_core to Cargo.toml. If you only use azure_storage_queue re-exports, direct azure_core dependency is optional.

Environment Variables

AZURE_STORAGE_QUEUE_ENDPOINT=https://<account>.queue.core.windows.net/ # Required for all operations

Authentication

use azure_core::http::Url;
use azure_identity::DeveloperToolsCredential;
use azure_storage_queue::QueueServiceClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Local dev: DeveloperToolsCredential. Production: use ManagedIdentityCredential.
    let credential = DeveloperToolsCredential::new(None)?;
    let service_url = Url::parse("https://<storage_account_name>.queue.core.windows.net/")?;
    let service_client = QueueServiceClient::new(service_url, Some(credential), None)?;

    // Derive a queue client by name.
    let queue_client = service_client.queue_client("<queue_name>")?;
    Ok(())
}

Client Types

ClientPurposeAccess
QueueServiceClientAccount-level operations, list queuesQueueServiceClient::new()
QueueClientQueue operations, send/receive/deleteservice_client.queue_client("<name>")?

Core Workflow

Send a Message

use azure_core::http::Url;
use azure_identity::DeveloperToolsCredential;
use azure_storage_queue::{models::QueueMessage, QueueServiceClient};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credential = DeveloperToolsCredential::new(None)?;
    let service_url = Url::parse("https://<storage_account_name>.queue.core.windows.net/")?;
    let service_client = QueueServiceClient::new(service_url, Some(credential), None)?;
    let queue_client = service_client.queue_client("<queue_name>")?;

    let message = QueueMessage {
        message_text: Some("hello world".to_string()),
    };
    queue_client.send_message(message.try_into()?, None).await?;
    Ok(())
}

Receive Messages

use azure_core::http::Url;
use azure_identity::DeveloperToolsCredential;
use azure_storage_queue::QueueServiceClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credential = DeveloperToolsCredential::new(None)?;
    let service_url = Url::parse("https://<storage_account_name>.queue.core.windows.net/")?;
    let service_client = QueueServiceClient::new(service_url, Some(credential), None)?;
    let queue_client = service_client.queue_client("<queue_name>")?;

    let response = queue_client.receive_messages(None).await?;
    let messages = response.into_model()?;
    for msg in messages.items.unwrap_or_default() {
        println!("{}", msg.message_text.as_deref().unwrap_or("<empty>"));
    }
    Ok(())
}

Delete a Message

After receiving a message, delete it using the message ID and pop receipt:

let response = queue_client.receive_messages(None).await?;
let messages = response.into_model()?;
for msg in messages.items.unwrap_or_default() {
    if let (Some(id), Some(pop_receipt)) = (&msg.message_id, &msg.pop_receipt) {
        queue_client.delete_message(id, pop_receipt, None).await?;
    }
}

Peek Messages

Peek at messages without removing them from the queue:

let response = queue_client.peek_messages(None).await?;
let messages = response.into_model()?;
for msg in messages.items.unwrap_or_default() {
    println!("Peeked: {}", msg.message_text.as_deref().unwrap_or("<empty>"));
}

RBAC Roles

For Entra ID auth, assign one of these roles to the identity:

RoleAccess
Storage Queue Data ReaderRead and peek messages
Storage Queue Data ContributorRead/write messages
Storage Queue Data Message SenderSend messages only
Storage Queue Data Message ProcessorReceive and delete

Best Practices

  1. Use cargo add to manage dependencies, never edit Cargo.toml directly. Add and remove Rust SDK dependencies with cargo commands instead of manual manifest edits.
  2. Add azure_core only when importing azure_core types directly. If your code imports azure_core::http::Url, azure_core::http::RequestContent, or azure_core::error::ErrorKind, include azure_core; otherwise a direct dependency is optional.
  3. Use DeveloperToolsCredential for local dev, ManagedIdentityCredential for production — Rust does not provide a single DefaultAzureCredential type
  4. Never hardcode credentials — use environment variables or managed identity
  5. Assign RBAC roles — ensure appropriate queue data roles for the identity
  6. Use QueueServiceClient as the entry point and derive QueueClient from it via queue_client()
  7. Delete messages after processing — use the message ID and pop receipt from receive_messages
  8. Reuse clients — clients are thread-safe; create once, share across tasks

Reference Links

ResourceLink
API Referencehttps://docs.rs/crate/azure_storage_queue/latest
crates.iohttps://crates.io/crates/azure_storage_queue
Source Codehttps://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/storage/azure_storage_queue

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.

Frequently asked questions about Azure Queue Storage for Rust

Similar skills