azure-eventhub-rust — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited azure-eventhub-rust (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Client library for Azure Event Hubs — big data streaming platform and event ingestion service.
The examples below require a reviewed compatible crate set and replacement of every resource placeholder. Do not use production data for demonstration writes.
cargo add azure_messaging_eventhubs@=0.16.0 azure_identity@=1.1.0-beta.1 azure_core@=1.2.0-beta.1export EVENTHUBS_HOST="<namespace>.servicebus.windows.net"
export EVENTHUB_NAME="<eventhub-name>"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?;producer.send_event(vec![1, 2, 3, 4], None).await?;let batch = producer.create_batch(None).await?;
if !batch.try_add_event_data(b"event 1".to_vec(), None)? {
return Err("Event does not fit in the batch".into());
}
if !batch.try_add_event_data(b"event 2".to_vec(), None)? {
return Err("Send the existing batch and retry the remaining event in a new batch".into());
}
producer.send_batch(batch, None).await?;use azure_messaging_eventhubs::ConsumerClient;
let credential = DeveloperToolsCredential::new(None)?;
let consumer = ConsumerClient::builder()
.open("<namespace>.servicebus.windows.net", "eventhub-name", credential.clone())
.await?;// Open receiver for specific partition
use futures::StreamExt;
let receiver = consumer.open_receiver_on_partition("0".to_string(), None).await?;
let mut events = receiver.stream_events();
// Bound the receive loop and handle the no-event timeout without logging payloads.
for _ in 0..100 {
match tokio::time::timeout(std::time::Duration::from_secs(10), events.next()).await {
Ok(Some(Ok(event))) => { /* process the authorized event and checkpoint safely */ }
Ok(Some(Err(error))) => return Err(error.into()),
Ok(None) | Err(_) => break,
}
}let properties = consumer.get_eventhub_properties(None).await?;
println!("Partitions: {:?}", properties.partition_ids);let partition_props = consumer.get_partition_properties("0", None).await?;
println!("Last sequence number: {}", partition_props.last_enqueued_sequence_number);try_add_event_data returns false when fullazure_messaging_eventhubs_checkpointstore_blob for distributed consumersFor distributed consumers with checkpointing:
cargo add azure_messaging_eventhubs_checkpointstore_blobEvent Hubs 0.16 uses the Azure core beta line, so pair it with the published matching identity beta; do not mix credential traits from the stable core line.
The reviewed example set uses azure_messaging_eventhubs 0.16.0 and compatible Azure core/credential crates. Record and commit Cargo.lock; source/API review is not a compiler or live-service test.
| 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 |
Use when a Rust application publishes individual/batched events or consumes a specific Event Hubs partition with an explicit consumer group and checkpoint policy.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.