Skip to content
Skillpedia
APIs & servers (backend)48k · #2374

azure-servicebus-rust

Helps your agent send and receive messages in systems using Rust. Useful for robust communication between applications.

What it does

This tool allows programs written in Rust to send and receive messages using Azure Service Bus. It acts like a mail system so different parts of a program can communicate reliably.

When to use it

  • ✓When a Rust program needs to send or receive data from other systems.
  • ✓To build systems where multiple parts communicate by exchanging messages.
  • ✓To ensure important messages aren't lost and can be processed even if the program temporarily fails.

Example of what to ask your AI

“How do I make my Rust program send a message to the 'orders' queue in Azure Service Bus?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-servicebus-rust/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-servicebus-rust/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The Rust program connects to Azure Service Bus using credentials. It can then create 'senders' to send messages to queues or topics, and 'receivers' to read messages from them.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill azure-servicebus-rust

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/azure-servicebus-rust/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Azure Service Bus library for Rust

When to Use

Use this skill when you need azure Service Bus library for Rust. Send and receive messages using queues, topics, and subscriptions. Triggers: "service bus rust", "ServiceBusClient rust", "send message servicebus rust", "receive message servicebus rust", "queue rust messaging", "topic subscription rust".

Client library for Azure Service Bus — enterprise message broker with queues and publish-subscribe topics.

⚠️ WARNING: This crate is in early development and SHOULD NOT be used in production. APIs may change without notice.

Use this skill when:

  • An app needs to send or receive messages via Azure Service Bus from Rust
  • You need queue-based messaging with competing consumers
  • You need publish-subscribe messaging with topics and subscriptions
  • You need reliable message delivery with completion semantics

IMPORTANT: Only use the official azure_messaging_servicebus 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_messaging_servicebus azure_identity tokio

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

Environment Variables

SERVICEBUS_NAMESPACE=<namespace>.servicebus.windows.net # Required — fully qualified namespace

Key Concepts

Concept Description
Namespace Container for all messaging components
Queue Point-to-point messaging with competing consumers
Topic Publish-subscribe messaging — one sender, many subscribers
Subscription Receives messages from a topic
Message Package of data and metadata, with completion/abandon semantics

Authentication

use azure_identity::DeveloperToolsCredential;
use azure_messaging_servicebus::ServiceBusClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Local dev: DeveloperToolsCredential. Production: use ManagedIdentityCredential.
    let credential = DeveloperToolsCredential::new(None)?;
    let client = ServiceBusClient::builder()
        .open("your_namespace.servicebus.windows.net", credential.clone())
        .await?;
    Ok(())
}

Core Workflow

Send a Message to a Queue

use azure_identity::DeveloperToolsCredential;
use azure_messaging_servicebus::{ServiceBusClient, Message};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credential = DeveloperToolsCredential::new(None)?;
    let client = ServiceBusClient::builder()
        .open("your_namespace.servicebus.windows.net", credential.clone())
        .await?;
    let sender = client.create_sender("my_queue", None).await?;

    let message = Message::from("Hello, Service Bus!");
    sender.send_message(message, None).await?;
    Ok(())
}

Receive Messages from a Queue

use azure_identity::DeveloperToolsCredential;
use azure_messaging_servicebus::ServiceBusClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credential = DeveloperToolsCredential::new(None)?;
    let client = ServiceBusClient::builder()
        .open("your_namespace.servicebus.windows.net", credential.clone())
        .await?;
    let receiver = client.create_receiver("my_queue", None).await?;

    let messages = receiver.receive_messages(5, None).await?;
    for message in messages {
        println!("Received: {}", message.body_as_string()?);
        receiver.complete_message(&message, None).await?;
    }
    Ok(())
}

Send a Message to a Topic

let sender = client.create_sender("my_topic", None).await?;
let message = Message::from("Hello, Topic subscribers!");
sender.send_message(message, None).await?;

Receive Messages from a Subscription

let receiver = client
    .create_receiver_for_subscription("my_topic", "my_subscription", None)
    .await?;

let messages = receiver.receive_messages(5, None).await?;
for message in messages {

…
FAQ

What is Azure Service Bus?

It's a Microsoft service that acts as a message broker. It allows different applications to send and receive messages reliably, even if they aren't online at the same time.

What are queues and topics?

Queues are for point-to-point communication (one message goes to one receiver). Topics are for publish/subscribe (one message can go to multiple interested receivers).

Can I use this in production?

No, this code is still in early development and not recommended for production use. Features might change.

Details

Original description by the author

Azure Service Bus library for Rust. Send and receive messages using queues, topics, and subscriptions. Triggers: "service bus rust", "ServiceBusClient rust", "send message servicebus rust", "receive message servicebus rust", "queue rust messaging", "topic subscription rust".

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#2374
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills