Reliable MQTT auto-reconnect #1

Merged
zyberzero merged 3 commits from mqtt-auto-reconnect into main 2026-11-03 17:56:35 +00:00
2 changed files with 13 additions and 1 deletions
Showing only changes of commit e22b2038d0 - Show all commits

No files matched your search

+4 -1
View File
@@ -8,7 +8,10 @@
"UseTls": false,
"BaseTopic": "frames",
"PublishQos": 1,
"RetryBackoffSeconds": [1, 2, 5, 15, 60]
"RetryBackoffSeconds": [1, 2, 5, 15, 60],
"ReconnectBackoffSeconds": [1, 2, 5, 15, 30],
"KeepAliveSeconds": 15,
"ConnectTimeoutSeconds": 10
},
"ApiKey": "change-me",
"Storage": {
@@ -32,4 +32,13 @@ public sealed class MqttOptions
[MinLength(1)]
public int[] RetryBackoffSeconds { get; set; } = Array.Empty<int>();
[MinLength(1)]
public int[] ReconnectBackoffSeconds { get; set; } = [1, 2, 5, 15, 30];
[Range(1, 3600)]
public int KeepAliveSeconds { get; set; } = 15;
[Range(1, 300)]
public int ConnectTimeoutSeconds { get; set; } = 10;
}