azure-eventhub-rust
/azure-eventhub-rust
Wysyła i odbiera zdarzenia oraz pobiera strumieniowo dane w Azure Event Hubs przez SDK dla Rusta.
- Autor
- pinkpixel-dev ↗
- Repozytorium
- skills-collection-1 ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 09.08.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 3
Brak sygnałów. Repozytorium zmienione 09.08.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Wysyła i odbiera zdarzenia oraz pobiera strumieniowo dane w Azure Event Hubs przez SDK dla Rusta.
Oryginalny opis (EN)
Azure Event Hubs SDK for Rust. Use for sending and receiving events, streaming data ingestion.
Jak działa
- Installation
- Environment Variables
- Key Concepts
- Producer Client
- Consumer Client
- Best Practices
- Checkpoint Store (Optional)
- Reference Links
- When to Use
Podgląd SKILL.md
---
name: azure-eventhub-rust
description: Azure Event Hubs SDK for Rust. Use for sending and receiving events, streaming data ingestion.
risk: unknown
source: community
date_added: '2026-02-27'
---
# 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.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · pinkpixel-dev/skills-collection-1 | 100 | Apache-2.0 |
| FrancoStino/opencode-skills-collection | 100 | MIT |
| rootcastleco/rei-skills | 100 | MIT |
| LiHongwei-cn/lihongwei-cn | 100 | MIT |
Identyczna treść występuje jeszcze w 3 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 28.10.2026 · wersja paczki 8a47b6138915 (skrót SHA-256 całej paczki)
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100azure-eventhub-ts
Buduje aplikacje do strumieniowania zdarzeń z Azure Event Hubs SDK dla JavaScript: ingestia o dużej przepustowości, analityka w czasie rzeczywistym i telemetria IoT. - 100azure-eventhub-java
Buduje w Javie aplikacje strumieniowe czasu rzeczywistego z Azure Event Hubs SDK: strumieniowanie zdarzeń, pobieranie danych o dużej przepustowości i architektury zdarzeniowe. - 100azure-eventhub-java
Pomaga budować w Javie aplikacje strumieniowe czasu rzeczywistego z Azure Event Hubs SDK: strumieniowanie zdarzeń, wysokoprzepustowe pobieranie danych i architektury zdarzeniowe. - 100azure-eventhub-java
Pomaga budować w Javie aplikacje strumieniowe czasu rzeczywistego z Azure Event Hubs SDK: strumieniowanie zdarzeń, wysokoprzepustowe pobieranie danych i architektury zdarzeniowe. - 100azure-eventhub-java
Pomaga budować w Javie aplikacje strumieniowe czasu rzeczywistego z Azure Event Hubs SDK: strumieniowanie zdarzeń, wysokoprzepustowe pobieranie danych i architektury zdarzeniowe. - 100azure-eventhub-java
Buduje aplikacje strumieniowe w czasie rzeczywistym z Azure Event Hubs SDK dla Javy: strumieniowanie zdarzeń, ingestia danych o dużej przepustowości i architektury zdarzeniowe.