fix(comm+site): route BrowseOpcUaNodeCommand via DeploymentManagerActor singleton

This commit is contained in:
Joseph Doherty
2026-05-28 12:51:45 -04:00
parent 2c138b6a25
commit f401a9ea0e
2 changed files with 17 additions and 16 deletions
@@ -146,22 +146,13 @@ public class SiteCommunicationActor : ReceiveActor, IWithTimers
Receive<RouteToSetAttributesRequest>(msg => _deploymentManagerProxy.Forward(msg));
// OPC UA Tag Browser (interactive design-time query) — forward to the
// site-local Data Connection Manager actor, which owns the in-memory
// map of live data-connection adapters keyed by ConnectionName and
// executes the browse against the appropriate OPC UA client. The
// manager is not a child of DeploymentManagerActor, so we route via
// ActorSelection rather than the _deploymentManagerProxy field; the
// path matches the registration in AkkaHostedService. ActorSelection
// has no Forward() helper, so we Tell with the original Sender so the
// BrowseOpcUaNodeResult routes straight back to the central UI's Ask
// (via the CentralCommunicationActor sender chain), not to us.
Receive<BrowseOpcUaNodeCommand>(msg =>
{
_log.Debug(
"Routing BrowseOpcUaNodeCommand for connection '{0}' to DataConnectionManager",
msg.ConnectionName);
Context.ActorSelection("/user/dcl-manager").Tell(msg, Sender);
});
// Deployment Manager singleton, which always lands on the active site
// node. Routing to the site-local /user/dcl-manager directly is wrong
// because the standby node has a dcl-manager too, but its
// DataConnectionActor children (which own the live OPC UA sessions)
// only exist on the singleton's node. The singleton then re-forwards
// to its own /user/dcl-manager, which DOES have the connection.
Receive<BrowseOpcUaNodeCommand>(msg => _deploymentManagerProxy.Forward(msg));
// Pattern 7: Remote Queries
Receive<EventLogQueryRequest>(msg =>