https://github.com/cryptex-github/deadpool-amqprs
Dead simple async pool for amqprs
https://github.com/cryptex-github/deadpool-amqprs
Last synced: 6 months ago
JSON representation
Dead simple async pool for amqprs
- Host: GitHub
- URL: https://github.com/cryptex-github/deadpool-amqprs
- Owner: Cryptex-github
- License: mit
- Created: 2023-02-12T06:58:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-10T06:38:07.000Z (over 1 year ago)
- Last Synced: 2024-09-14T22:30:43.606Z (8 months ago)
- Language: Rust
- Homepage: https://crates.io/crates/deadpool-amqprs
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deadpool-amqprs
## Deadpool for amqprs
Deadpool is a dead simple async pool for connections and objects of any type.
This crate implements a [`deadpool`](https://crates.io/crates/deadpool) manager for [`amqprs`](https://crates.io/crates/amqprs).
## Versions
* v0.2.x - amqprs 0.9.x
* v0.3.x - amqprs 0.10.x## Example
```rs
use deadpool_amqprs::Config;
use amqprs::{callbacks::{DefaultChannelCallback, DefaultConnectionCallback}, connection::OpenConnectionArguments};#[tokio::main]
async fn main() {
let config = Config::new_with_con_args(OpenConnectionArguments::default());
let pool = config.create_pool();
let con = pool.get().await.unwrap();
con.register_callback(DefaultConnectionCallback).await.unwrap();let channel = con.open_channel().await.unwrap();
channel.register_callback(DefaultChannelCallback).await.unwrap();// Do stuff with `channel`.
}
```