Files
scadalink-design/src/ScadaLink.NotificationOutbox/NotificationOutboxOptions.cs

27 lines
1.3 KiB
C#

namespace ScadaLink.NotificationOutbox;
/// <summary>
/// Configuration options for the Notification Outbox component: dispatch cadence,
/// batch sizing, stuck-message detection, terminal retention, and KPI windowing.
/// </summary>
public class NotificationOutboxOptions
{
/// <summary>Interval between dispatch sweeps that pick up pending notifications for delivery.</summary>
public TimeSpan DispatchInterval { get; set; } = TimeSpan.FromSeconds(10);
/// <summary>Maximum number of notifications claimed for delivery in a single dispatch sweep.</summary>
public int DispatchBatchSize { get; set; } = 100;
/// <summary>Age past which an in-progress notification is considered stuck and re-claimed.</summary>
public TimeSpan StuckAgeThreshold { get; set; } = TimeSpan.FromMinutes(10);
/// <summary>Retention period for notifications in a terminal state before they are purged.</summary>
public TimeSpan TerminalRetention { get; set; } = TimeSpan.FromDays(365);
/// <summary>Interval between background purge sweeps of terminal notifications.</summary>
public TimeSpan PurgeInterval { get; set; } = TimeSpan.FromDays(1);
/// <summary>Trailing window used to compute the delivered-notifications throughput KPI.</summary>
public TimeSpan DeliveredKpiWindow { get; set; } = TimeSpan.FromMinutes(1);
}