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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user