Tokio NSQ
A Rust NSQ client built on Tokio. Tokio NSQ aims to be a feature complete NSQ client implementation.
Tokio NSQ is available as a cargo package, and API documentation is available on docs.rs.
Versioning
This project follows strict semantic versioning. While pre 1.0.0
breaking changes have only a minor version bump.
Basic consumer example
let topic = new.unwrap;
let channel = new.unwrap;
let mut addresses = new;
addresses.insert;
let mut consumer = new
.set_max_in_flight
.set_sources
.build;
let mut message = consumer.consume_filtered.await.unwrap;
let message_body_str = from_utf8.unwrap;
println!;
message.finish;
Basic producer example
let topic = new.unwrap;
let mut producer = new.build;
// Wait until a connection is initialized
assert_matches!;
// Publish a single message
producer.publish.unwrap;
// Wait until the message is acknowledged by NSQ
assert_matches!;
Features
- Subscriptions
- Publication
- NSQLookupd based discovery.
- Message requeue backoff
- NSQD TLS negotiation
- Unverified server certificates
- Custom certificate authority
- Client certificates
- Deflate NSQD compression
- Snappy NSQD compression
- Sampling
- Auth