diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-06-27 21:45:29 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-06-27 21:46:51 +0100 |
commit | ce71a662f977c9dd3790c62620ebd0568276b05f (patch) | |
tree | 9543f0e4f27932a1bbafcf073ce7f2d88c51224a | |
parent | 9c4df3969e21b2d82d34e379b05d2d7ae2e8c29f (diff) | |
download | mqttr-ce71a662f977c9dd3790c62620ebd0568276b05f.tar.gz mqttr-ce71a662f977c9dd3790c62620ebd0568276b05f.tar.xz mqttr-ce71a662f977c9dd3790c62620ebd0568276b05f.zip |
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/main.rs | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 73e40cd..f11ef3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ * The message DUP, QoS, and RETAIN fields as well as the Packet Identifier (when QoS is 1 or 2) are now appended (in that order) to the process arguments. +### Changed + +* The default subscription QoS is now 2 (exactly once) + ### Fixed * Changelog 0.1.0 link now references the tag not an arbitrary diff. @@ -79,7 +79,7 @@ it being ran every time a new MQTT message is published to this topic. ## Missing Features * Configurable timeouts (eventually configurable per process) -* Configurable QoS for each subscription (default is 0 (at most once)) +* Configurable QoS for each subscription (default is 2 (exactly once)) * Configurable logging * Ability to configure programs with non-UTF-8 in paths * Maybe config reloading on SIGHUP diff --git a/src/main.rs b/src/main.rs index bc59b0b..0ba13f4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -75,7 +75,7 @@ async fn main() -> anyhow::Result<()> { let (client, mut event_loop) = conf.mqtt_client(); for topic in conf.routes.keys() { // TODO: Configurable subscription QoS - if let Err(e) = client.subscribe(topic, QoS::AtMostOnce).await { + if let Err(e) = client.subscribe(topic, QoS::ExactlyOnce).await { eprintln!("warning: Failed to subscribe to '{topic}': {e:?}"); } } |