azure-eventhub-rust
Client library patterns for Azure Event Hubs streaming in Rust.
Install
mkdir -p .claude/skills/azure-eventhub-rust-rjsolucoes && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14212" && unzip -o skill.zip -d .claude/skills/azure-eventhub-rust-rjsolucoes && rm skill.zipInstalls to .claude/skills/azure-eventhub-rust-rjsolucoes
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Azure Event Hubs SDK for Rust. Use for sending and receiving events, streaming data ingestion. Triggers: "event hubs rust", "ProducerClient rust", "ConsumerClient rust", "send event rust", "streaming rust".Key capabilities
- →Create a producer client for Azure Event Hubs in Rust
- →Send single events to an Event Hub
- →Send batches of events to an Event Hub
- →Create a consumer client to receive events from partitions
- →Get Event Hub properties like partition IDs
How it works
The skill uses the Azure Event Hubs SDK for Rust to create producer and consumer clients, allowing events to be sent to and received from Event Hubs.
Inputs & outputs
When to use azure-eventhub-rust
- →Streaming data ingestion with Event Hubs
- →Implementing producer clients in Rust
- →Consuming event partitions
- →Sending batches of events
About this skill
Azure Event Hubs SDK for Rust
Client library for Azure Event Hubs — big data streaming platform and event ingestion service.
Installation
cargo add azure_messaging_eventhubs azure_identity
Environment Variables
EVENTHUBS_HOST=<namespace>.servicebus.windows.net
EVENTHUB_NAME=<eventhub-name>
Key Concepts
- Namespace — container for Event Hubs
- Event Hub — stream of events partitioned for parallel processing
- Partition — ordered sequence of events
- Producer — sends events to Event Hub
- Consumer — receives events from partitions
Producer Client
Create Producer
use azure_identity::DeveloperToolsCredential;
use azure_messaging_eventhubs::ProducerClient;
let credential = DeveloperToolsCredential::new(None)?;
let producer = ProducerClient::builder()
.open("<namespace>.servicebus.windows.net", "eventhub-name", credential.clone())
.await?;
Send Single Event
producer.send_event(vec![1, 2, 3, 4], None).await?;
Send Batch
let batch = producer.create_batch(None).await?;
batch.try_add_event_data(b"event 1".to_vec(), None)?;
batch.try_add_event_data(b"event 2".to_vec(), None)?;
producer.send_batch(batch, None).await?;
Consumer Client
Create Consumer
use azure_messaging_eventhubs::ConsumerClient;
let credential = DeveloperToolsCredential::new(None)?;
let consumer = ConsumerClient::builder()
.open("<namespace>.servicebus.windows.net", "eventhub-name", credential.clone())
.await?;
Receive Events
// Open receiver for specific partition
let receiver = consumer.open_partition_receiver("0", None).await?;
// Receive events
let events = receiver.receive_events(100, None).await?;
for event in events {
println!("Event data: {:?}", event.body());
}
Get Event Hub Properties
let properties = consumer.get_eventhub_properties(None).await?;
println!("Partitions: {:?}", properties.partition_ids);
Get Partition Properties
let partition_props = consumer.get_partition_properties("0", None).await?;
println!("Last sequence number: {}", partition_props.last_enqueued_sequence_number);
Best Practices
- Reuse clients — create once, send many events
- Use batches — more efficient than individual sends
- Check batch capacity —
try_add_event_datareturns false when full - Process partitions in parallel — each partition can be consumed independently
- Use consumer groups — isolate different consuming applications
- Handle checkpointing — use
azure_messaging_eventhubs_checkpointstore_blobfor distributed consumers
Checkpoint Store (Optional)
For distributed consumers with checkpointing:
cargo add azure_messaging_eventhubs_checkpointstore_blob
Reference Links
When not to use it
- →When using a different programming language than Rust
- →When not interacting with Azure Event Hubs
- →When a different event streaming platform is in use
Prerequisites
Limitations
- →The skill is specific to the Rust programming language
- →The skill is designed for Azure Event Hubs, not other cloud messaging services
- →Checkpointing for distributed consumers requires an additional crate
How it compares
This skill provides specific Rust SDK implementations for Azure Event Hubs, enabling direct integration and control over event streaming compared to generic messaging solutions.
Compared to similar skills
azure-eventhub-rust side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| azure-eventhub-rust (this skill) | 0 | 5mo | Review | Intermediate |
| add-api-version | 1 | 6mo | Review | Advanced |
| solana-dev | 0 | 4mo | Review | Advanced |
| mcp | 0 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by RJsolucoes
View all by RJsolucoes →You might also like
add-api-version
oxidecomputer
Add a new version to a Dropshot HTTP API. Use when the user wants to make versioned changes to a Dropshot-managed HTTP API, such as adding, making changes to, or removing an API endpoint.
solana-dev
mashharuki
Use when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "deploy to devnet", or "explain Solana concepts" (rent, accounts, PDAs, CPIs, etc.). End-to-end Solana development playbook covering
mcp
Piebald-AI
Guide for working with Splitrail's MCP server. Use when adding tools, resources, or modifying the MCP interface.
solana-dev
solanabr
Unified skill hub for Solana development. Routes to external submodule skills (solana-foundation, sendai, solana-game, trailofbits, cloudflare, qedgen, colosseum) and local skills. Progressive disclosure — read only what you need.
use-rest-api
torrust
Use the Torrust Tracker REST API. Covers authentication, all endpoints (stats, metrics, torrents, auth keys, whitelist), and making announce/scrape requests to verify API behaviour. Triggers on "use API", "test API", "call REST API", "query API", "API endpoint", "curl tracker", "tracker client", "an
tauri
EpicenterHQ
Tauri path handling, cross-platform file operations, and API usage. Use when working with file paths in Tauri frontend code, accessing filesystem APIs, or handling platform differences in desktop apps.