summaryrefslogtreecommitdiff
path: root/mqtt.go
AgeCommit message (Collapse)Author
2025-12-20Use default configxengineering
The default config JSON is embedded as bytes into the executable. Instead of constants the default values are now parsed from these embedded bytes.
2025-12-20Implement <prefix>/server/healthxengineering
This indicates if the Sia server is available and connected to the MQTT broker. Using the MQTT Will messages these will also be sent if the Sia server unexpectedly crashes. Using the retained flag it is ensured that freshly connected MQTT clients will receive these messages even when they missed the initial one from the Sia server.
2025-12-20Add MQTT keepalivesxengineering
This issues ping request / response messages between the Sia server and the MQTT broker making sure an interrupted connection is noticed.
2025-12-20Implement MQTT reconnectsxengineering
This is a central requirement to ensure a restart of the MQTT broker does not harm the Sia server operation.
2025-12-20Log MQTT disconnectxengineering
This makes connection loss visible during debugging.
2025-12-20Separate MQTT logicxengineering
This reduces the coupling between the MQTT-related code and everything else to a single `tx` channel of type `MQTTMessage`. This improves the code quality significantly.