2026-02-27 21:44:38 +01:00
2026-02-27 21:44:38 +01:00
2026-02-27 18:59:46 +01:00
2026-02-27 21:37:07 +01:00

MQTT Publisher

A simple Rust application that publishes messages to an MQTT broker.

Dependencies

  • tokio (with full features)
  • rumqttc
  • serde
  • serde_json

Usage

cargo run -- 192.168.1.100 1883

Or run the binary directly:

./target/debug/mqtt-publisher [broker] [port]

Arguments

  • broker: MQTT broker address (default: localhost)
  • port: MQTT broker port (default: 1883)

Configuration

Edit src/main.rs to customize:

  • Broker address (default: localhost:1883)
  • MQTT topic (default: test/topic)
  • Message payload

Example

client.publish("your/topic", QoS::AtLeastOnce, false, b"Your message").await?;
Description
No description provided
Readme 72 KiB
Languages
Rust 100%