Initial commit: MQTT publisher with rumqttc

This commit is contained in:
Ollo
2026-02-27 18:55:58 +01:00
commit 3d3585501e
5 changed files with 790 additions and 0 deletions

29
README.md Normal file
View File

@@ -0,0 +1,29 @@
# MQTT Publisher
A simple Rust application that publishes messages to an MQTT broker.
## Dependencies
- tokio (with full features)
- rumqttc
- serde
- serde_json
## Usage
```bash
cargo run
```
## Configuration
Edit `src/main.rs` to customize:
- Broker address (default: `localhost:1883`)
- MQTT topic (default: `test/topic`)
- Message payload
## Example
```rust
client.publish("your/topic", QoS::AtLeastOnce, false, b"Your message").await?;
```