azure-eventhub-rust
Azure Event Hubs SDK for Rust. Use for sending and receiving events, streaming data ingestion.
About this skill
This skill integrates an AI agent with Azure Event Hubs, a highly scalable data streaming platform and event ingestion service. By leveraging the Azure Event Hubs SDK for Rust, the agent can programmatically send and receive events, facilitating real-time data ingestion and processing workflows. It equips agents with the capability to manage high-throughput event streams, making it ideal for scenarios like IoT telemetry, application logging, and stream analytics, particularly when a robust, performant, and memory-safe language like Rust is preferred for backend operations.
Best use case
An AI agent needing to ingest real-time data from various sources (e.g., IoT devices, application logs). An agent required to send events to a stream processing pipeline. An agent that needs to consume and process large volumes of events from an Azure Event Hub.
Azure Event Hubs SDK for Rust. Use for sending and receiving events, streaming data ingestion.
The agent successfully sends events to a specified Azure Event Hub, or successfully connects to and receives events from a partition within an Event Hub, reporting the outcome and any processed data.
Practical example
Example input
Using the `azure-eventhub-rust` skill, configure an Event Hub producer to send the following JSON message: `{"sessionId": "xyz", "event": "page_view", "timestamp": "2023-10-27T10:00:00Z"}` to an Event Hub named `website-analytics` within the namespace `my-app-namespace`. Report success or failure.Example output
```
Agent: I will now use the Azure Event Hubs SDK for Rust to generate and execute code that sends your message.
(Agent generates and executes Rust code based on provided parameters)
Successfully sent event `{"sessionId": "xyz", "event": "page_view", "timestamp": "2023-10-27T10:00:00Z"}` to Event Hub 'website-analytics' in namespace 'my-app-namespace'.
```When to use this skill
- Use this skill when your AI agent needs to perform high-volume, real-time data streaming operations with Azure Event Hubs, particularly when the agent is capable of generating and executing Rust code. This is suitable for building event-driven architectures, processing IoT data, or integrating with big data analytics pipelines where events need to be reliably delivered and processed at scale.
When not to use this skill
- Do not use this skill if the AI agent does not have the capability to compile and execute Rust code. If event messaging requirements are low-volume and simpler, an alternative like Azure Queue Storage or Azure Service Bus might be more appropriate. This skill is also not suitable if your primary need is general-purpose text analysis, as the core functionality is data streaming.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/azure-eventhub-rust/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How azure-eventhub-rust Compares
| Feature / Agent | azure-eventhub-rust | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | medium | N/A |
Frequently Asked Questions
What does this skill do?
Azure Event Hubs SDK for Rust. Use for sending and receiving events, streaming data ingestion.
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as medium. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
Top AI Agents for Productivity
See the top AI agent skills for productivity, workflow automation, operational systems, documentation, and everyday task execution.
SKILL.md Source
# Azure Event Hubs SDK for Rust
Client library for Azure Event Hubs — big data streaming platform and event ingestion service.
## Installation
```sh
cargo add azure_messaging_eventhubs azure_identity
```
## Environment Variables
```bash
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
```rust
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
```rust
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(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
```rust
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
```rust
// 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
```rust
let properties = consumer.get_eventhub_properties(None).await?;
println!("Partitions: {:?}", properties.partition_ids);
```
### Get Partition Properties
```rust
let partition_props = consumer.get_partition_properties("0", None).await?;
println!("Last sequence number: {}", partition_props.last_enqueued_sequence_number);
```
## Best Practices
1. **Reuse clients** — create once, send many events
2. **Use batches** — more efficient than individual sends
3. **Check batch capacity** — `try_add_event_data` returns false when full
4. **Process partitions in parallel** — each partition can be consumed independently
5. **Use consumer groups** — isolate different consuming applications
6. **Handle checkpointing** — use `azure_messaging_eventhubs_checkpointstore_blob` for distributed consumers
## Checkpoint Store (Optional)
For distributed consumers with checkpointing:
```sh
cargo add azure_messaging_eventhubs_checkpointstore_blob
```
## Reference Links
| Resource | Link |
|----------|------|
| API Reference | https://docs.rs/azure_messaging_eventhubs |
| Source Code | https://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/eventhubs/azure_messaging_eventhubs |
| crates.io | https://crates.io/crates/azure_messaging_eventhubs |
## When to Use
This skill is applicable to execute the workflow or actions described in the overview.Related Skills
azure-eventhub-py
Azure Event Hubs SDK for Python streaming. Use for high-throughput event ingestion, producers, consumers, and checkpointing.
azure-eventhub-dotnet
Azure Event Hubs SDK for .NET.
microsoft-azure-webjobs-extensions-authentication-events-dotnet
Microsoft Entra Authentication Events SDK for .NET. Azure Functions triggers for custom authentication extensions.
azure-web-pubsub-ts
Real-time messaging with WebSocket connections and pub/sub patterns.
azure-storage-queue-ts
Azure Queue Storage JavaScript/TypeScript SDK (@azure/storage-queue) for message queue operations. Use for sending, receiving, peeking, and deleting messages in queues.
azure-storage-queue-py
Azure Queue Storage SDK for Python. Use for reliable message queuing, task distribution, and asynchronous processing.
azure-storage-file-share-ts
Azure File Share JavaScript/TypeScript SDK (@azure/storage-file-share) for SMB file share operations.
azure-storage-file-share-py
Azure Storage File Share SDK for Python. Use for SMB file shares, directories, and file operations in the cloud.
azure-storage-file-datalake-py
Azure Data Lake Storage Gen2 SDK for Python. Use for hierarchical file systems, big data analytics, and file/directory operations.
azure-storage-blob-ts
Azure Blob Storage JavaScript/TypeScript SDK (@azure/storage-blob) for blob operations. Use for uploading, downloading, listing, and managing blobs and containers.
azure-storage-blob-rust
Azure Blob Storage SDK for Rust. Use for uploading, downloading, and managing blobs and containers.
azure-storage-blob-py
Azure Blob Storage SDK for Python. Use for uploading, downloading, listing blobs, managing containers, and blob lifecycle.