namespace ZB.MOM.WW.MxGateway.Server.Alarms; /// /// Completes an alarm-feed subscriber that fell behind its bounded queue and was dropped. /// /// /// A typed exception rather than a bare so the gRPC /// layer can map it to ResourceExhausted — the status a StreamEvents overflow /// carries — without treating a slow client as a gateway failure (an unrecognized exception is /// logged as a warning with its stack and surfaced as Unavailable). The remedy is the /// same as for an event-stream overflow: reconnect, which re-snapshots the alarm set. /// public sealed class AlarmFeedSubscriberOverflowException : Exception { /// The message every dropped subscriber is completed with. public const string DefaultMessage = "Alarm feed subscriber fell behind and was dropped; reconnect to re-snapshot."; /// Initializes a new instance of the class. public AlarmFeedSubscriberOverflowException() : base(DefaultMessage) { } /// Initializes a new instance of the class. /// The error message. public AlarmFeedSubscriberOverflowException(string message) : base(message) { } /// Initializes a new instance of the class. /// The error message. /// The exception that caused this one. public AlarmFeedSubscriberOverflowException(string message, Exception innerException) : base(message, innerException) { } }