ClusterSharding stopping ShardedDaemonProcess actors

Hi, I currently have a process on which the ActorSystem starts a ShardedDaemonProcess across clusters.

However, in some situations, I have to stop all the actors running on the actorSystem and ShardeDaemonProcess (without stopping the actorSystem actor) on all clusters.

Is there a way to stop a ShardedDaemonProcess and all its child actors, but keep the actorSystem Actor?

There is no way to have a more fine grained lifecycle control of the Sharded Daemon Process, it is tied to actor system/cluster node as it is right now, and it would be hard to implement since that depends on Akka Cluster Sharding having such functionality.

You could potentially message the actors running in SDP with some stop message, but since SDP will keep pinging the specified indexes they will restart if you stop them, and also, if the processes are rebalanced by sharding, the new instances will not know that the previous ones got such a stop message and likely start anew.

I think you will have to figure out some alternative solution not using SDP if stopping the processes, but keeping the cluster nodes alive, is a hard requirement in your use case.