Deadpool for Lapin Latest Version

Deadpool is a dead simple async pool for connections and objects of any type.

This crate implements a deadpool manager for lapin.

Features

| Feature | Description | Extra dependencies | Default | | ------- | ----------- | ------------------ | ------- | | config | Enable support for config crate | config, serde/derive | yes |

Example

```rust use deadpool_lapin::Config; use lapin::{ options::BasicPublishOptions, BasicProperties };

[tokio::main]

async fn main() { let cfg = Config::fromenv("AMQP").unwrap(); let pool = cfg.createpool(); for i in 1..10 { let mut connection = pool.get().await.unwrap(); let channel = connection.createchannel().await.unwrap(); channel.basicpublish( "", "hello", BasicPublishOptions::default(), b"hello from deadpool".to_vec(), BasicProperties::default() ).await.unwrap(); } } ```

License

Licensed under either of

at your option.