girishkvs/constraining-agent-procedures/azure-eventhub-rust
Claude Code and agent skill by girishkvs/constraining-agent-procedures
- community
Checking that the SKILL.md file is still in the repository.
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".
Install
npx vskill@latest install girishkvs/constraining-agent-procedures/azure-eventhub-rustSKILL.md
The same SKILL.md was published earlier as microsoft/skills/azure-eventhub-rust.
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 officialazure_messaging_eventhubscrate 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
DeveloperToolsCredential::new(None)?already returns anArc<DeveloperToolsCredential>, so you can pass or clone it directly into.open(). Addazure_coreonly when you need directazure_coreimports such asErrorKind.
Environment Variables
Key Concepts
| Concept | Description | |
|---|---|---|
| Namespace | Container for one or more Event Hubs | |
| Event Hub | Stream of events, partitioned for parallel reads | |
| Partition | Ordered, append-only sequence of events | |
| Producer | Sends events via ProducerClient | |
| Consumer | Receives events from partitions via ConsumerClient |
Authentication
Rust Azure SDK code must not use DefaultAzureCredential. The Rust identity crate does not provide that type.
Prefer the crate README/examples when checking builder signatures and receive-stream event wrapper shapes.
Core Workflow
Send Events
Send Batch
Receive Events
Receive from Partition
RBAC Roles
For Entra ID auth, assign one of these roles:
| Role | Access | |
|---|---|---|
Azure Event Hubs Data Sender | Send events | |
Azure Event Hubs Data Receiver | Receive events | |
Azure Event Hubs Data Owner | Full access |
Best Practices
- 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.
- Pass or clone credentials directly into `.open()`.
DeveloperToolsCredential::new(None)?already returns anArc, so you do not need to annotate the binding asArc<dyn TokenCredential>unless you are naming that trait object type explicitly. - Match the builder signature.
ProducerClient::builder().open(...)takes the hub name as&str, whileConsumerClient::builder().open(...)takes an ownedString. - Use `DeveloperToolsCredential` for local dev, `ManagedIdentityCredential` for production — Rust does not provide a single
DefaultAzureCredentialtype - Never hardcode credentials — use environment variables or managed identity
- Use batching —
create_batch+send_batchfor throughput optimization - Handle errors per event — match on
Ok/Errin the event stream - Extract event bodies via `event.event_data().body()`, not
event.body()—ReceivedEventDatawraps the underlyingEventData. - Specify start position — use
StartLocation::EarliestorStartLocation::Latestto control where consumption begins - Run `cargo clippy -- -D warnings` when the prompt, eval, or CI expects lint-clean output
Reference Links
| Resource | Link | |
|---|---|---|
| API Reference | https://docs.rs/azure_messaging_eventhubs/latest/azure_messaging_eventhubs | |
| crates.io | https://crates.io/crates/azure_messaging_eventhubs | |
| Source Code | https://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/eventhubs/azure_messaging_eventhubs |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcorpus/microsoft/skills/.github/plugins/azure-sdk-rust/skills/azure-eventhub-rust/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/girishkvs/constraining-agent-procedures/azure-eventhub-rust)