4 releases

0.3.0 Feb 12, 2023
0.2.2 Nov 27, 2022
0.2.1 Jul 14, 2021
0.2.0 Feb 2, 2021

#11 in #amqp-client


Used in metalmq

Apache-2.0

145KB
3.5K SLoC

Architecture of metalmq client

The client architecture follows the hexagonal architecture in order that we can easily describe the business logic or better to say protocol logic.

+-----------------------------------------------------------+
| Infrastructure                                            |
|                                                           |
| --> client_api                +----------+                |
|                 --> processor |  state   | --> processor  |
|                               |  error   |                |
| --> channel_api               |  model   |                |
|                               +----------+                |
|                                                           |
+-----------------------------------------------------------+

lib.rs:

AMQP 0.9 compatible async client based on Tokio.

Usage

Add the following to your Cargo.toml

[dependencies]
metalmq-client = "0.2.2"

And then from an async function you can connect to an AMQP server.

use metalmq_client::Client;

async fn send_message() {
    let mut client = Client::connect("localhost:5672", "guest", "guest").await.unwrap();

    client.channel_open(1).await.unwrap();
    client.close().await.unwrap();
}

Dependencies

~4–15MB
~161K SLoC