omq 0.6.0

Pure Rust OMQ/ZeroMQ. Facade over omq-compio (default) or omq-tokio. Wire-compatible with libzmq.
Documentation

omq

Facade crate for omq. Re-exports one backend:

Feature Backend Crate
compio-backend (default) Single-threaded, io_uring omq-compio
tokio-backend Multi-threaded, tokio omq-tokio

Mutually exclusive.

Install

cargo add omq                     # compio backend (default)
cargo add omq --no-default-features --features tokio-backend

Usage

use omq::Socket;
use omq::prelude::*;

let push = Socket::new(SocketType::Push, Options::default());
push.bind("tcp://127.0.0.1:5555".parse()?).await?;

let pull = Socket::new(SocketType::Pull, Options::default());
pull.connect("tcp://127.0.0.1:5555".parse()?).await?;

push.send(Message::single("hello")).await?;
let msg = pull.recv().await?;

See the workspace README for benchmarks, feature matrix, and interop details.

License

ISC