refactor(mesh): step 3 — delete both ClusterClientReceptionist registrations
Central's CentralCommunicationActor and a node's NodeCommunicationActor no longer register with a receptionist; the ActorRegistry entry each already carried is now the whole reachability story, and it is what CentralCommandGrpcService / NodeCommandGrpcService resolve to hand an inbound message over. Both `using Akka.Cluster.Tools.Client` directives are gone with them.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Akka.Actor;
|
||||
using Akka.Cluster.Hosting;
|
||||
using Akka.Cluster.Tools.Client;
|
||||
using Akka.Hosting;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@@ -94,11 +93,9 @@ public static class ServiceCollectionExtensions
|
||||
() => serviceProvider.GetService<IMeshPskProvider>()),
|
||||
MeshPaths.CentralCommunicationName);
|
||||
|
||||
// Registered unconditionally, in both transport modes. Under Dps nothing dials it, and
|
||||
// an idle registration costs nothing — whereas registering only under ClusterClient
|
||||
// would mean flipping the flag on a running fleet requires a central restart before any
|
||||
// node can ack, turning a config change back into a deployment.
|
||||
ClusterClientReceptionist.Get(system).RegisterService(actor);
|
||||
// The registry entry is the whole reachability story: CentralCommandGrpcService resolves
|
||||
// this key to hand an inbound ack over. Nothing registers with a receptionist any more —
|
||||
// there is no Akka association between central and a site mesh to register into.
|
||||
registry.Register<CentralCommunicationActorKey>(actor);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Immutable;
|
||||
using Akka.Actor;
|
||||
using Akka.Cluster.Tools.Client;
|
||||
using Akka.Event;
|
||||
using Akka.Hosting;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -433,10 +431,9 @@ public static class ServiceCollectionExtensions
|
||||
NodeCommunicationActor.Props(ackSender),
|
||||
MeshPaths.NodeCommunicationName);
|
||||
|
||||
// Registered with the receptionist in ALL modes: under Dps and Grpc nothing dials it, and
|
||||
// an idle registration costs nothing — whereas registering only under ClusterClient would
|
||||
// make flipping the flag require a node restart before central could reach it.
|
||||
ClusterClientReceptionist.Get(system).RegisterService(nodeComm);
|
||||
// The registry entry is the whole reachability story: NodeCommandGrpcService resolves
|
||||
// this key to hand an inbound command over. Nothing registers with a receptionist any
|
||||
// more — there is no Akka association from central into this mesh to register into.
|
||||
registry.Register<NodeCommunicationActorKey>(nodeComm);
|
||||
|
||||
// Continuous-historization recorder — gated on ContinuousHistorization:Enabled AND the
|
||||
|
||||
Reference in New Issue
Block a user