namespace ZB.MOM.WW.MxGateway.Server.Configuration; public sealed class EventOptions { /// /// Gets the event queue capacity. /// public int QueueCapacity { get; init; } = 10_000; /// /// Gets the backpressure policy for event queue overflow. /// public EventBackpressurePolicy BackpressurePolicy { get; init; } = EventBackpressurePolicy.FailFast; /// /// Gets the maximum number of events retained in the per-session replay ring buffer /// used to re-deliver events a returning subscriber missed (reconnect/reattach). /// When the buffer exceeds this count the oldest retained events are evicted first. /// A value of 0 disables replay retention entirely. /// public int ReplayBufferCapacity { get; init; } = 1024; /// /// Gets the maximum age, in seconds, of an event retained in the per-session replay /// ring buffer. Entries older than this are evicted regardless of capacity. A value /// of 0 disables age-based eviction (only /// bounds the buffer). /// public double ReplayRetentionSeconds { get; init; } = 300; }