Crates.io | mqtt-service |
lib.rs | mqtt-service |
version | 0.5.0 |
source | src |
created_at | 2024-06-22 10:03:34.33904 |
updated_at | 2024-10-02 20:33:52.679769 |
description | This crates provide a convenient support for the MQTT Response-Pattern. It uses the rumqttc library to connect to the MQTT broker. |
homepage | |
repository | https://gitlab.com/cyloncore/mqtt-service |
max_upload_size | |
id | 1280325 |
size | 14,632 |
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.
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:?}'");