20 breaking releases

new 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 25, 2022

#817 in Network programming

Download history 1958/week @ 2024-07-02 2779/week @ 2024-07-09 1949/week @ 2024-07-16 2253/week @ 2024-07-23 2238/week @ 2024-07-30 1974/week @ 2024-08-06 1869/week @ 2024-08-13 1634/week @ 2024-08-20 2029/week @ 2024-08-27 2381/week @ 2024-09-03 2087/week @ 2024-09-10 2901/week @ 2024-09-17 2655/week @ 2024-09-24 2514/week @ 2024-10-01 2116/week @ 2024-10-08 2550/week @ 2024-10-15

10,641 downloads per month
Used in azure-storage-cli

MIT license

370KB
9K SLoC

azure_storage_queues

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.

The Azure Storage Queue crate

This crate is from the Azure SDK for Rust. It supports Azure Queue Storage.

Example

use azure_storage::prelude::*;
use azure_storage_queues::prelude::*;

#[tokio::main]
async fn main() -> azure_core::Result<()> {
    let account = std::env::var("STORAGE_ACCOUNT").expect("missing STORAGE_ACCOUNT");
    let access_key = std::env::var("STORAGE_ACCESS_KEY").expect("missing STORAGE_ACCESS_KEY");
    let queue_name = std::env::var("STORAGE_QUEUE_NAME").expect("missing STORAGE_QUEUE_NAME");

    let storage_credentials = StorageCredentials::access_key(account.clone(), access_key);
    let queue_service = QueueServiceClient::new(account, storage_credentials);
    let queue = queue_service.queue_client(queue_name);

    // process messages until there are no more
    loop {
        let response = queue.get_messages().await?;
        if response.messages.is_empty() {
            break;
        }
        for message in response.messages {
            println!("processing message {:?}", message);
            queue.pop_receipt_client(message).delete().await?;
        }
    }

    Ok(())
}

License: MIT

Dependencies

~8–22MB
~330K SLoC