#amqp #rabbitmq #mio #futures

deprecated lapin-async-global-executor

lapin integration with async-global-executor

10 releases (4 stable)

3.0.0 Feb 2, 2022
2.0.0 Dec 23, 2020
1.1.0 Nov 21, 2020
0.4.1 Oct 16, 2020

#8 in #amqp0-9-1

Download history 24/week @ 2023-02-01 73/week @ 2023-02-08 34/week @ 2023-02-15 22/week @ 2023-02-22 2/week @ 2023-03-01 5/week @ 2023-03-08 4/week @ 2023-03-15 2/week @ 2023-03-22 4/week @ 2023-03-29 12/week @ 2023-04-05 19/week @ 2023-04-12 5/week @ 2023-04-26 14/week @ 2023-05-03 29/week @ 2023-05-10 11/week @ 2023-05-17

59 downloads per month

MIT license

340KB
9K SLoC

Lapin integration with async-global-executor

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

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

fn main() -> Result<()> {
    async_global_executor::run(async {
        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_global_executor()).await?; // Note the `with_async_global_executor()` here
        let channel = conn.create_channel().await?;

        // Rest of your program
    })
}

Dependencies

~7–13MB
~274K SLoC