Files
mxaccessgw/src/ZB.MOM.WW.MxGateway.Server/Dashboard/Hubs/AlarmFeedReset.cs
T
Joseph Doherty 3688fa19e6 fix(dashboard): time-bound alarm hub sends and mark each resubscribe
AlarmsHubPublisher awaited every group send unbounded inside the StreamAsync
loop, so one slow client stalled the drain until the monitor dropped the
subscriber and the resubscribe replayed the full snapshot to everyone. Each
broadcast is now bounded (2s) and abandoned on timeout, and every
(re)subscription is preceded by an AlarmFeedReset frame so clients discard
state before the replayed snapshot.
2026-10-22 06:14:53 -04:00

15 lines
675 B
C#

namespace ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs;
/// <summary>
/// Payload of the <see cref="AlarmsHub.ResetMessage"/> frame: the publisher has
/// (re)subscribed to the central alarm monitor, which primes the subscription with
/// a full active-alarm snapshot. A client discards its accumulated alarm state on
/// receipt and rebuilds it from the <c>active_alarm</c> rows up to the next
/// <c>snapshot_complete</c>.
/// </summary>
/// <param name="Generation">
/// Monotonic subscription counter for this gateway process, starting at 1. Lets a
/// client tell a resubscribe from a duplicate delivery.
/// </param>
public sealed record AlarmFeedReset(long Generation);