3 releases (breaking)
new 0.3.0 | Sep 2, 2024 |
---|---|
0.2.0 | Jun 22, 2024 |
0.1.0 | Jun 22, 2024 |
#1808 in Network programming
147 downloads per month
17KB
388 lines
mqtt-service
This crate provides a convenient support for the MQTT Response-Pattern. It uses the rumqttc library to connect to the MQTT broker.
Note: this crate is feature complete, and few changes are expected.
How to use
cargo add mqtt-service
let connection = mqtt_service::Connection::new("name-of-the-client", "localhost", 1883);
let r = connection.call_service("name/of/service" "Some data");
let res = futures::executor::block_on(r.unwrap());
println!("Result is '{res:?}'");
Dependencies
~4–13MB
~148K SLoC