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

#60 in #rabbitmq

Download history 409/week @ 2024-03-13 314/week @ 2024-03-20 186/week @ 2024-03-27 516/week @ 2024-04-03 347/week @ 2024-04-10 415/week @ 2024-04-17 440/week @ 2024-04-24 545/week @ 2024-05-01 469/week @ 2024-05-08 657/week @ 2024-05-15 230/week @ 2024-05-22 498/week @ 2024-05-29 587/week @ 2024-06-05 442/week @ 2024-06-12 306/week @ 2024-06-19 306/week @ 2024-06-26

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

MIT license

350KB
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–19MB
~299K SLoC