diff --git a/appsettings.json b/appsettings.json index 9492e16..673c7da 100644 --- a/appsettings.json +++ b/appsettings.json @@ -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": { diff --git a/src/FrameProcessor/Configuration/MqttOptions.cs b/src/FrameProcessor/Configuration/MqttOptions.cs index 6c7c845..fb2eb96 100644 --- a/src/FrameProcessor/Configuration/MqttOptions.cs +++ b/src/FrameProcessor/Configuration/MqttOptions.cs @@ -32,4 +32,13 @@ public sealed class MqttOptions [MinLength(1)] public int[] RetryBackoffSeconds { get; set; } = Array.Empty(); + + [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; }