Official agent skill

Azure Eventhub Rust

by microsoft in microsoft/skills

Azure Event Hubs library for Rust. An agent skill from microsoft/skills.

OfficialMITAuto-check passedData & Analytics

Install Azure Eventhub Rust

skills CLI
$ npx skills add microsoft/skills --skill azure-eventhub-rust -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/skills azure-eventhub-rust --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/plugins/azure-sdk-rust/skills/azure-eventhub-rust .claude/skills/azure-eventhub-rust && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
azure-eventhub-rust
GitHub stars
3.1k
Token cost
~1.7k tokens
SKILL.md length
414 words
Files
1
Skills in repo
150
Repo updated
First seen
Licence
MIT

At a glance

Azure Event Hubs library for Rust. An agent skill from microsoft/skills.

  • Works in 10 steps: Use cargo add to manage dependencies,… → Pass or clone credentials directly into… → Match the builder signature.… → …
  • Tasks that involve Data pipelines and ETL
  • SKILL.md covers Installation, Environment Variables, Key Concepts and Authentication, plus 4 more sections
  • Calls cargo

What it does

Azure Eventhub Rust is an agent skill from microsoft/skills, published by the product's own GitHub organization. Azure Event Hubs library for Rust. Send and receive events for streaming data ingestion and batch processing. Triggers: "event hubs rust", "ProducerClient rust", "ConsumerClient rust", "send event rust", "streaming rust", "eventhub rust".

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Data pipelines and ETL. It works with Azure Event Hubs, Rust and Microsoft Azure. The repository describes itself as: Skills, MCP servers, Custom Agents, Agents.md for SDKs to ground Coding Agents. The licence is MIT.

When your agent uses it

  • Tasks that involve Data pipelines and ETL

Example prompts

  • “event hubs rust”
  • “ProducerClient rust”
  • “ConsumerClient rust”
  • “/azure-eventhub-rust”

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Use cargo add to manage dependencies, never edit Cargo.toml directly. Add and remove Rust SDK dependencies with cargo commands instead of…
  2. Pass or clone credentials directly into .open(). DeveloperToolsCredential::new(None)? already returns an Arc, so you do not need to…
  3. Match the builder signature. ProducerClient::builder().open(...) takes the hub name as &str, while ConsumerClient::builder().open(...)…
  4. Use DeveloperToolsCredential for local dev, ManagedIdentityCredential for production — Rust does not provide a single…
  5. Never hardcode credentials — use environment variables or managed identity
  6. Use batching — create_batch + send_batch for throughput optimization
  7. Handle errors per event — match on Ok/Err in the event stream
  8. Extract event bodies via event.event_data().body(), not event.body() — ReceivedEventData wraps the underlying EventData.
  9. Specify start position — use StartLocation::Earliest or StartLocation::Latest to control where consumption begins
  10. Run cargo clippy -- -D warnings when the prompt, eval, or CI expects lint-clean output

What it can do on your machine

Read from SKILL.md and the folder at commit 3898ec8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • crates.io
    • docs.rs
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Azure Eventhub Rust loads about 1.7k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 414 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/skills at commit 3898ec8, republished under its MIT licence (© microsoft). 414 words, ~1,711 tokens.

Download SKILL.mdSave it as .claude/skills/azure-eventhub-rust/SKILL.md (or your agent's skills folder).
name
azure-eventhub-rust
description
Azure Event Hubs library for Rust. Send and receive events for streaming data ingestion and batch processing. Triggers: "event hubs rust", "ProducerClient rust", "ConsumerClient rust", "send event rust", "streaming rust", "eventhub rust".
license
MIT
metadata.author
Microsoft
metadata.package
azure_messaging_eventhubs

Azure Event Hubs library for Rust

Client library for Azure Event Hubs — send and receive events for streaming data ingestion.

Use this skill when:

  • An app needs to send events to Azure Event Hubs from Rust
  • You need to receive and process events from partitions
  • You need batch sending for throughput optimization
  • You need to control consumer start position

IMPORTANT: Only use the official azure_messaging_eventhubs 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

sh
cargo add azure_messaging_eventhubs azure_identity tokio futures

DeveloperToolsCredential::new(None)? already returns an Arc<DeveloperToolsCredential>, so you can pass or clone it directly into .open(). Add azure_core only when you need direct azure_core imports such as ErrorKind.

Environment Variables

bash
EVENTHUBS_HOST=<namespace>.servicebus.windows.net # Required — fully qualified namespace
EVENTHUB_NAME=<eventhub-name>                     # Required — name of the Event Hub

Key Concepts

ConceptDescription
NamespaceContainer for one or more Event Hubs
Event HubStream of events, partitioned for parallel reads
PartitionOrdered, append-only sequence of events
ProducerSends events via ProducerClient
ConsumerReceives events from partitions via ConsumerClient

Authentication

Rust Azure SDK code must not use DefaultAzureCredential. The Rust identity crate does not provide that type.

rust
use azure_identity::DeveloperToolsCredential;
use azure_messaging_eventhubs::ProducerClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Local dev: DeveloperToolsCredential. Production: use ManagedIdentityCredential.
    let credential = DeveloperToolsCredential::new(None)?;

    let producer = ProducerClient::builder()
        .open(
            "<namespace>.servicebus.windows.net",
            "<eventhub-name>",
            credential.clone(),
        )
        .await?;
    Ok(())
}

Prefer the crate README/examples when checking builder signatures and receive-stream event wrapper shapes.

Core Workflow

Send Events
rust
// Send a single event
producer.send_event(vec![1, 2, 3, 4], None).await?;
Send Batch
rust
let batch = producer.create_batch(None).await?;
batch.try_add_event_data(vec![1, 2, 3, 4], None)?;

producer.send_batch(batch, None).await?;
Receive Events
rust
use azure_identity::DeveloperToolsCredential;
use azure_messaging_eventhubs::ConsumerClient;

// Local dev: DeveloperToolsCredential. Production: use ManagedIdentityCredential.
let credential = DeveloperToolsCredential::new(None)?;
let consumer = ConsumerClient::builder()
    .open(
        "<namespace>.servicebus.windows.net",
        "<eventhub-name>".to_string(),
        credential.clone(),
    )
    .await?;
Receive from Partition
rust
use futures::stream::StreamExt;
use azure_messaging_eventhubs::{
    ConsumerClient, OpenReceiverOptions, StartLocation, StartPosition,
};

let receiver = consumer
    .open_receiver_on_partition(
        "0".to_string(),
        Some(OpenReceiverOptions {
            start_position: Some(StartPosition {
                location: StartLocation::Earliest,
                ..Default::default()
            }),
            ..Default::default()
        }),
    )
    .await?;

let mut stream = receiver.stream_events();
while let Some(event_result) = stream.next().await {
    match event_result {
        // Body is on the inner event data, not the received wrapper: `event.event_data().body()`.
        Ok(event) => {
            let body = event.event_data().body().unwrap_or_default();
            println!("Received: {:?}", body);
        }
        Err(err) => eprintln!("Error: {:?}", err),
    }
}

RBAC Roles

For Entra ID auth, assign one of these roles:

RoleAccess
Azure Event Hubs Data SenderSend events
Azure Event Hubs Data ReceiverReceive events
Azure Event Hubs Data OwnerFull access
Show full SKILL.md (179 more words)Show less

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. Pass or clone credentials directly into .open(). DeveloperToolsCredential::new(None)? already returns an Arc, so you do not need to annotate the binding as Arc<dyn TokenCredential> unless you are naming that trait object type explicitly.
  3. Match the builder signature. ProducerClient::builder().open(...) takes the hub name as &str, while ConsumerClient::builder().open(...) takes an owned String.
  4. Use DeveloperToolsCredential for local dev, ManagedIdentityCredential for production — Rust does not provide a single DefaultAzureCredential type
  5. Never hardcode credentials — use environment variables or managed identity
  6. Use batching — create_batch + send_batch for throughput optimization
  7. Handle errors per event — match on Ok/Err in the event stream
  8. Extract event bodies via event.event_data().body(), not event.body() — ReceivedEventData wraps the underlying EventData.
  9. Specify start position — use StartLocation::Earliest or StartLocation::Latest to control where consumption begins
  10. Run cargo clippy -- -D warnings when the prompt, eval, or CI expects lint-clean output

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/plugins/azure-sdk-rust/skills/azure-eventhub-rust of microsoft/skills.

Open the folder on GitHubat commit 3898ec8

Compare with similar skills

Azure Eventhub Rust next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Azure Eventhub Rust compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Azure Eventhub Rust this skillmicrosoft/skills3.1k—~1.7kAutomated safety check: PassMIT
Azure Eventhub Rustaiskillstore/marketplace4304 repos~936Automated safety check: PassNone
Azure Messagingmicrosoft/GitHub-Copilot-for-Azure2551 repos~821Automated safety check: PassMIT
Migrate To Riversion-elgreco/rivers102—~1.2kAutomated safety check: PassApache-2.0
Data Engineerdavila7/claude-code-templates32k8 repos~2.8kAutomated safety check: PassMIT
Datachain Knowledgedatachain-ai/datachain2.8k—~3kAutomated safety check: PassApache-2.0

Similar skills

  • Azure Eventhub Rust

    aiskillstore/marketplace

    Azure Event Hubs SDK for Rust. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 4 repos~936 tokens
    Data & AnalyticsAuto-check passed
  • Azure Messaging

    microsoft/GitHub-Copilot-for-Azure

    Official

    Troubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus.

    255 GitHub starsUsed in 1 repo~821 tokens
    Data & AnalyticsAuto-check passed
  • Migrate To Rivers

    ion-elgreco/rivers

    Translate a Dagster or Prefect project to rivers, the Rust-powered asset orchestrator.

    102 GitHub stars~1.2k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Data Engineer

    davila7/claude-code-templates

    Build scalable data pipelines, modern data warehouses, and real-time streaming architectures.

    32k GitHub starsUsed in 8 repos~2.8k tokens
    Data & AnalyticsAuto-check passed
  • Datachain Knowledge

    datachain-ai/datachain

    A skill your agent uses whenever datasets, cloud storage buckets, or data pipelines are mentioned — creating, saving, querying, listing, exploring, deleting, or processing data in S3, GCS, Azure…

    2.8k GitHub stars~3k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Azure Storage

    microsoft/GitHub-Copilot-for-Azure

    Official

    Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and Data Lake.

    255 GitHub starsUsed in 2 repos~1.3k tokens
    DatabasesAuto-check passed

More from microsoft/skills

All 150 skills in this repo
  • Official

    Covers producer, consumer, and checkpoint-store setup for Azure Event Hubs streaming in Python, with Entra ID auth and partition targeting.

    3.1k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Official

    Builds podcast-style audio narration from text with Azure OpenAI's GPT Realtime Mini over WebSocket, from a Python FastAPI backend to a React player.

    3.1k GitHub starsUsed in 1 repo~947 tokens
    Auto-check passed
  • Frontend UI Dark TS

    microsoft/skills

    Official

    Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations.

    3.1k GitHub starsUsed in 5 repos~3.6k tokens
    Auto-check passed
  • Pydantic Models Py

    microsoft/skills

    Official

    Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants.

    3.1k GitHub starsUsed in 5 repos~496 tokens
    Auto-check passed
  • Official

    Reference for building on Microsoft Foundry with the azure-ai-projects Python SDK: project clients, versioned agents, evaluations, connections, datasets and indexes.

    3.1k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Skill Creator

    microsoft/skills

    Official

    Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services.

    3.1k GitHub starsUsed in 5 repos~17k tokens
    Auto-check passed

Questions about Azure Eventhub Rust

What does Azure Eventhub Rust do?

Azure Event Hubs library for Rust. An agent skill from microsoft/skills. Azure Eventhub Rust is an agent skill from microsoft/skills, published by the product's own GitHub organization. Azure Event Hubs library for Rust.

When should I use Azure Eventhub Rust?

Azure Eventhub Rust fits situations like: tasks that involve Data pipelines and ETL.

How do I install Azure Eventhub Rust in Claude Code?

Run `npx skills add microsoft/skills --skill azure-eventhub-rust -a claude-code`. Or copy the skill folder (.github/plugins/azure-sdk-rust/skills/azure-eventhub-rust in microsoft/skills) into .claude/skills/azure-eventhub-rust in your project. Claude Code loads it when a task matches its description.

How do I install Azure Eventhub Rust in Codex?

Run `npx skills add microsoft/skills --skill azure-eventhub-rust -a codex`. Or copy the skill folder (.github/plugins/azure-sdk-rust/skills/azure-eventhub-rust in microsoft/skills) into .agents/skills/azure-eventhub-rust in your project. Codex loads it when a task matches its description.

Can I use Azure Eventhub Rust in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/skills --skill azure-eventhub-rust -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/azure-eventhub-rust, .gemini/skills/azure-eventhub-rust, .github/skills/azure-eventhub-rust and .opencode/skills/azure-eventhub-rust in your project.

What does Azure Eventhub Rust need to run?

Going by SKILL.md and its folder, Azure Eventhub Rust needs the command-line tools its instructions call (cargo).

Does Azure Eventhub Rust access the network?

SKILL.md names 3 domains. As links in the text: crates.io, docs.rs and github.com. This is read from the text; nothing was executed.

Is Azure Eventhub Rust safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Azure Eventhub Rust use?

Azure Eventhub Rust is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Azure Eventhub Rust use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Azure Eventhub Rust?

Skills that share tags, products or a category with Azure Eventhub Rust: Azure Eventhub Rust (aiskillstore/marketplace, 430 stars), Azure Messaging (microsoft/GitHub-Copilot-for-Azure, 255 stars), Migrate To Rivers (ion-elgreco/rivers, 102 stars) and Data Engineer (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Azure Eventhub Rust?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/skills, which has 3,094 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on October 9, 2026.

Source: microsoft/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.