This library implements a uTransport client for MQTT5 in Rust following the uProtocol uTransport Specifications.
To build the library, run cargo build
in the project root directory. Tests can be run with cargo test
. This library leverages the up-rust library for data types and models specified by uProtocol.
To run the tests from the repo root directory, run
cargo test
First, ensure you have a local MQTT broker running, such as Mosquitto.
Then start the following two examples from your repo root directory.
cargo run --example publisher_example
cargo run --example subscriber_example
This shows an example of a UPMqttClient publishing from one device and a UPMqttClient subscribing to the publishing device to receive data.
The library contains the following modules:
Package | uProtocol spec | Purpose |
---|---|---|
transport | uP-L1 Specifications | Implementation of MQTT5 uTransport client used for bidirectional point-2-point communication between uEs. |
Please refer to the publisher_example and subscriber_example examples to see how to initialize and use the UPClientMqtt client.