3688fa19e6
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.
15 lines
675 B
C#
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);
|