Reliable MQTT auto-reconnect #1
No files matched your search
+4
-1
@@ -8,7 +8,10 @@
|
|||||||
"UseTls": false,
|
"UseTls": false,
|
||||||
"BaseTopic": "frames",
|
"BaseTopic": "frames",
|
||||||
"PublishQos": 1,
|
"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",
|
"ApiKey": "change-me",
|
||||||
"Storage": {
|
"Storage": {
|
||||||
|
|||||||
@@ -32,4 +32,13 @@ public sealed class MqttOptions
|
|||||||
|
|
||||||
[MinLength(1)]
|
[MinLength(1)]
|
||||||
public int[] RetryBackoffSeconds { get; set; } = Array.Empty<int>();
|
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;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user