8 unstable releases (3 breaking)

0.3.2 May 24, 2020
0.3.1 Apr 19, 2020
0.2.0 Apr 7, 2020
0.1.0 Mar 23, 2020
0.0.1 Feb 19, 2020

#182 in Asynchronous

Download history 12/week @ 2020-10-30 14/week @ 2020-11-06 5/week @ 2020-11-13 6/week @ 2020-11-20 15/week @ 2020-11-27 41/week @ 2020-12-04 14/week @ 2020-12-11 3/week @ 2020-12-18 39/week @ 2021-01-01 7/week @ 2021-01-08 2/week @ 2021-01-15 5/week @ 2021-01-22 20/week @ 2021-01-29 12/week @ 2021-02-05 46/week @ 2021-02-12

479 downloads per month

MIT/Apache

75KB
1K SLoC

Async version for ZeroMQ bindings

Async-zmq is high-level bindings for zmq in asynchronous manner which is compatible to every async runtime. No need for configuring or tuning features. Just plug in and see how it works!

Usage

Users could simply initialize any socket type with async_zmq::* in mind, and then call bind() or connect depends on your scenario. For example, if someone wants a publish socket, then he could initialize the socket like this:

let zmq = async_zmq::publish("tcp://127.0.0.1:5555")?.bind();

If there's context need to be shared between different socket, we can set it during building the socket:

let context = Context::new();
let xpub = async_zmq::xpublish("inproc://example")?.with_context(&context).bind();
let sub = subscribe("inproc://example")?.with_context(&context).connect()?;

Since the use case of this crate is mostly for sending/recieving multipart message. So it provides [Multipart] which is a type alias for Vec<Message> when recieving message on type implemented with Stream, and [MultipartIter] which is a generic struct make any queue can turn into iterator and then send via type implemented with Sink.

To learn more about each socket type usage. See modules below.

Dependencies

~1.8–2.5MB
~52K SLoC