Added support for persisted retained messages.

This commit is contained in:
Christian Kratky
2019-03-11 20:15:12 +01:00
parent e1799ea6a3
commit 1311535eed
7 changed files with 139 additions and 14 deletions
@@ -0,0 +1,11 @@
namespace MQTTnet.Server.Configuration
{
public class RetainedApplicationMessagesModel
{
public bool Persist { get; set; } = false;
public int WriteInterval { get; set; } = 10;
public string Filename { get; set; } = "RetainedApplicationMessages.json";
}
}
@@ -5,10 +5,6 @@
/// </summary>
public class SettingsModel
{
public SettingsModel()
{
}
/// <summary>
/// Set default connection timeout in seconds
/// </summary>
@@ -43,5 +39,10 @@
/// Set limit for max pending messages per client
/// </summary>
public int MaxPendingMessagesPerClient { get; set; } = 250;
/// <summary>
/// The settings for retained messages.
/// </summary>
public RetainedApplicationMessagesModel RetainedApplicationMessages { get; set; } = new RetainedApplicationMessagesModel();
}
}