5 releases (3 breaking)

Uses old Rust 2015

0.4.1 Dec 15, 2017
0.4.0 Dec 15, 2017
0.3.1 Nov 14, 2017
0.2.0 Oct 23, 2017
0.1.0 Sep 30, 2017

#40 in #rabbitmq

31 downloads per month
Used in amqpr

MIT/Apache

41KB
913 lines

amqpr-api

A tokio future based amqp api library.

Apache-2.0 licensed Crates.io

This library provides low lovel api. I recommend you to use amqpr library instead.

Examples

Establish connection

use amqpr_api::handshake::{start_handshake, SimpleHandshaker};
use tokio_core::reactor::Core;
use tokio_core::net::TcpStream;

let mut core = Core::new().unwrap();

let handshaker = SimpleHandshaker {
  user: "guest".into(),
  pass: "guest".into(),
  virtual_host: "/".into(),
};

let future = TcpStream::connect(&"127.0.0.1:5672".parse().unwrap(), &core.handle())
    .map_err(|e| Error::from(e))
    .and_then(move |socket| start_handshake(handshaker, socket));

let socket = core.run(future).unwrap();

lib.rs:

amqpr-api is AMQP client api library. You can talk with AMQP server via channel controller provided by this crate. There is two kind of channel controllers; GlobalChannelController and LocalChannelController.

Dependencies

~10MB
~168K SLoC