#sdk #azure #rest #iot #cloud

azure_messaging_servicebus

Rust wrappers around Microsoft Azure REST APIs - Service Bus crate

9 breaking releases

0.12.0 May 22, 2023
0.11.0 Mar 17, 2023
0.10.0 Feb 15, 2023
0.8.0 Dec 16, 2022
0.1.0 Jan 29, 2022

#38 in HTTP client

Download history 185/week @ 2023-02-16 177/week @ 2023-02-23 153/week @ 2023-03-02 290/week @ 2023-03-09 183/week @ 2023-03-16 186/week @ 2023-03-23 188/week @ 2023-03-30 90/week @ 2023-04-06 177/week @ 2023-04-13 238/week @ 2023-04-20 106/week @ 2023-04-27 91/week @ 2023-05-04 51/week @ 2023-05-11 114/week @ 2023-05-18 71/week @ 2023-05-25 90/week @ 2023-06-01

339 downloads per month

MIT license

195KB
4.5K SLoC

azure_messaging_servicebus

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").await?;

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

    Ok(())
}

License: MIT

Dependencies

~12–22MB
~491K SLoC