#mqtt #service #iot #rpc #response-pattern

mqtt-service

This crates provide a convenient support for the MQTT Response-Pattern. It uses the rumqttc library to connect to the MQTT broker.

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

Download history 239/week @ 2024-06-20 8/week @ 2024-06-27 147/week @ 2024-08-29

147 downloads per month

MIT license

17KB
388 lines

stable pipeline dev/1 pipeline docs crates.io

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