Announcing fe2o3-amqp 0.1.0 - AMQP 1.0 standard implemented in rust

fe2o3-amqp is a tokio and serde based rust implementation of the AMQP 1.0 standard (the core specification). It has recently passed amqp-types-test and amqp-large-content-test of the qpid-interop-test suite on my own device (it's not merged into the upstream yet). Though there are still a couple items not implemented yet (eg. link resumption),it should be ready for a 0.1.0 release.

It aims to provide an easy to use and ergonomic API, and here is a quick example of a sender.

use fe2o3_amqp::{connection::Connection, session::Session, Sender};

#[tokio::main]
async fn main() {
    let mut connection = Connection::open("connection-1", "amqp://localhost:5672")
        .await
        .unwrap();
    let mut session = Session::begin(&mut connection).await.unwrap();
    let mut sender = Sender::attach(&mut session, "rust-sender-link-1", "q1")
        .await
        .unwrap();

    let outcome = sender.send("hello AMQP").await.unwrap();
    outcome.accepted_or_else(|outcome| outcome).unwrap();

    sender.close().await.unwrap();
    session.end().await.unwrap();
    connection.close().await.unwrap();
}

More examples can be found on the Github repo. The docs and examples definitely need some improvement themselves, and I will be working on the in the upcoming days.

crates: https://crates.io/crates/fe2o3-amqp

Github: GitHub - minghuaw/fe2o3-amqp: A rust implementation of the AMQP1.0 protocol based on serde and tokio.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.