azuremessagingservicebus

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

```norun,rust use azuremessaging_servicebus::prelude::*;

[tokio::main]

async fn main() -> azurecore::Result<()> { let servicebusnamespace = std::env::var("AZURESERVICEBUSNAMESPACE").expect("missing AZURESERVICEBUSNAMESPACE"); let queuename = std::env::var("AZUREQUEUENAME").expect("missing AZUREQUEUENAME"); let policyname = std::env::var("AZUREPOLICYNAME").expect("missing AZUREPOLICYNAME"); let policykey = std::env::var("AZUREPOLICYKEY").expect("missing AZUREPOLICYKEY");

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