30 releases (4 stable)

2.0.0 Feb 2, 2022
1.2.0 Feb 17, 2021
1.1.0 Nov 21, 2020
0.1.8 Oct 16, 2020
0.1.4 Jun 26, 2020

#71 in #rabbitmq

Download history 1136/week @ 2024-11-14 947/week @ 2024-11-21 725/week @ 2024-11-28 751/week @ 2024-12-05 1302/week @ 2024-12-12 341/week @ 2024-12-19 4/week @ 2024-12-26 480/week @ 2025-01-02 819/week @ 2025-01-09 1006/week @ 2025-01-16 575/week @ 2025-01-23 584/week @ 2025-01-30 1066/week @ 2025-02-06 866/week @ 2025-02-13 802/week @ 2025-02-20 1162/week @ 2025-02-27

4,023 downloads per month
Used in 4 crates (3 directly)

MIT license

355KB
9K SLoC

Lapin integration with async-std

This crate integrates lapin with async-std by using async-std's executor inside of lapin for its internal operations and for consumer delegates.

use async_amqp::*;
use lapin::{Connection, ConnectionProperties, Result};

#[async_std::main]
async fn main() -> Result<()> {
    let addr = std::env::var("AMQP_ADDR").unwrap_or_else(|_| "amqp://127.0.0.1:5672/%2f".into());
    let conn = Connection::connect(&addr, ConnectionProperties::default().with_async_std()).await?; // Note the `with_async_std()` here
    let channel = conn.create_channel().await?;

    // Rest of your program
}

Dependencies

~9–24MB
~311K SLoC