fix: route debug stream events through ClusterClient site→central path

ClusterClient Sender refs are temporary proxies — valid for immediate reply
but not durable for future Tells. Events now flow as DebugStreamEvent through
SiteCommunicationActor → ClusterClient → CentralCommunicationActor → bridge
actor (same pattern as health reports). Also fix DebugStreamHub to use
IHubContext for long-lived callbacks instead of transient hub instance.
This commit is contained in:
Joseph Doherty
2026-03-21 11:32:17 -04:00
parent 41aff339b2
commit 3efec91386
7 changed files with 76 additions and 21 deletions

View File

@@ -40,6 +40,22 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
MaxScriptCallDepth = 10,
ScriptExecutionTimeoutSeconds = 30
};
// Create a fake site-communication actor that unwraps DebugStreamEvent
// and forwards the inner event to TestActor (simulating the ClusterClient relay)
Sys.ActorOf(Props.Create(() => new DebugStreamEventForwarder(TestActor)), "site-communication");
}
/// <summary>
/// Test helper: stands in for SiteCommunicationActor, unwraps DebugStreamEvent
/// and forwards the inner event to a target actor.
/// </summary>
private class DebugStreamEventForwarder : ReceiveActor
{
public DebugStreamEventForwarder(IActorRef target)
{
Receive<DebugStreamEvent>(msg => target.Tell(msg.Event));
}
}
void IDisposable.Dispose()