#azure-sdk #azure #sdk #cloud #azure-rest #iot #wrapper

azure_messaging_servicebus

Rust wrappers around Microsoft Azure REST APIs - Service Bus crate

17 breaking releases

0.20.0 Apr 24, 2024
0.19.0 Jan 5, 2024
0.18.0 Dec 8, 2023
0.17.0 Nov 3, 2023
0.1.0 Jan 29, 2022

#2456 in Network programming

Download history 27/week @ 2024-01-17 26/week @ 2024-01-24 19/week @ 2024-01-31 6/week @ 2024-02-07 29/week @ 2024-02-14 51/week @ 2024-02-21 46/week @ 2024-02-28 36/week @ 2024-03-06 38/week @ 2024-03-13 31/week @ 2024-03-20 85/week @ 2024-03-27 59/week @ 2024-04-03 66/week @ 2024-04-10 66/week @ 2024-04-17 336/week @ 2024-04-24 67/week @ 2024-05-01

549 downloads per month

MIT license

235KB
5.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

~7–20MB
~313K SLoC