#azure-sdk #microsoft-azure #azure #cloud #azure-rest #iot #sdk

azure_messaging_servicebus

Rust wrappers around Microsoft Azure REST APIs - Service Bus crate

18 breaking releases

0.21.0 Oct 15, 2024
0.20.0 Apr 24, 2024
0.19.0 Jan 5, 2024
0.18.0 Dec 8, 2023
0.1.0 Jan 29, 2022

#2717 in Network programming

Download history 155/week @ 2024-08-17 92/week @ 2024-08-24 95/week @ 2024-08-31 107/week @ 2024-09-07 77/week @ 2024-09-14 151/week @ 2024-09-21 195/week @ 2024-09-28 107/week @ 2024-10-05 267/week @ 2024-10-12 161/week @ 2024-10-19 407/week @ 2024-10-26 519/week @ 2024-11-02 541/week @ 2024-11-09 422/week @ 2024-11-16 580/week @ 2024-11-23 381/week @ 2024-11-30

2,047 downloads per month

MIT license

240KB
5.5K SLoC

azure_messaging_servicebus

Microsoft is developing the official Azure SDK for Rust crates and has no plans to update this unofficial crate. In the future we may release an official version that may have a different package name. If releasing an official version of this crate is important to you let us know.

Source for this crate can now be found in https://github.com/Azure/azure-sdk-for-rust/tree/legacy. To monitor for an official, supported version of this crate, see https://aka.ms/azsdk/releases.

Azure Service Bus crate for the unofficial Microsoft Azure SDK for Rust. This crate is part of a collection of crates: for more information please refer to https://github.com/azure/azure-sdk-for-rust.

Example

use azure_messaging_servicebus::prelude::*;

#[tokio::main]
async fn main() -> azure_core::Result<()> {
    let service_bus_namespace = std::env::var("AZURE_SERVICE_BUS_NAMESPACE").expect("missing AZURE_SERVICE_BUS_NAMESPACE");
    let queue_name = std::env::var("AZURE_QUEUE_NAME").expect("missing AZURE_QUEUE_NAME");
    let policy_name = std::env::var("AZURE_POLICY_NAME").expect("missing AZURE_POLICY_NAME");
    let policy_key = std::env::var("AZURE_POLICY_KEY").expect("missing AZURE_POLICY_KEY");

    let http_client = azure_core::new_http_client();
    let mut client = QueueClient::new(
        http_client,
        service_bus_namespace,
        queue_name,
        policy_name,
        policy_key,
    )?;

    client.send_message("hello world", None).await?;

    let received_message = client.receive_and_delete_message().await?;
    println!("Received Message: {}", received_message);

    Ok(())
}

License: MIT

Dependencies

~8–21MB
~303K SLoC