feat(adminui): add connection-health signal to in-process broadcaster + bridges

This commit is contained in:
Joseph Doherty
2026-06-11 09:20:36 -04:00
parent 565b77e6cf
commit 3a0e0907e4
4 changed files with 130 additions and 2 deletions
@@ -38,13 +38,22 @@ public sealed class AlertSignalRBridge : ReceiveActor
_hub = hub;
_broadcaster = broadcaster;
ReceiveAsync<AlarmTransitionEvent>(ForwardAsync);
Receive<SubscribeAck>(_ => { /* DPS confirmation */ });
// DPS subscription is now live — mark the feed connected so the Blazor "live" pill lights up.
Receive<SubscribeAck>(_ => _broadcaster.SetConnected(true));
}
/// <inheritdoc />
protected override void PreStart() =>
DistributedPubSub.Get(Context.System).Mediator.Tell(new Subscribe(TopicName, Self));
/// <inheritdoc />
protected override void PostStop()
{
// Bridge stopping — the feed is no longer live, drop the "live" pill.
_broadcaster.SetConnected(false);
base.PostStop();
}
private async Task ForwardAsync(AlarmTransitionEvent msg)
{
// In-process fan-out first — this is what the Blazor Server Alerts page reads. The hub push