Cluster sharding state across all the nodes

Using Akka cluster sharding 2.6.3 typed version. Is there any way to retrieve current state and info on nodes, shards and entities in each node?

I tried Akka http managment, it gives nodes and shards info, but it doesn’t provide the entity ids in each shard.

Came across following, which suggests to send ShardRegion.getShardRegionStateInstance to the shard region. I do not see how I can send this request for a typed shard region actor. Any sample code in Java would be helpful.
https://doc.akka.io/docs/akka/2.6.3/cluster-sharding.html#inspecting-cluster-sharding-state

Is there any way we can retrieve this info across all the nodes, probably from store coordinator?

This would be helpful to monitor and test the cluster.

Thanks

The sharding queries are not fully implemented in the new APIs yet. Some are, implemented, some are in progress (PR).

Thanks Patrik for the response. Can you let me know which older version has such support to query shar and entity ids and how would we do it?

Currently included in Akka 2.6.4 is akka.cluster.sharding.typed.GetShardRegionState.
Send GetShardRegionState message to the ClusterSharding(system).shardState. That will get the local regions state.

What is missing is the aggregated queries. Some work in progress in https://github.com/akka/akka/pull/28666

As a workaround you should be able to use the queries with the classic ClusterSharding even though the actual entities are initialized with Typed ClusterSharding. Then it’s the messages described in https://doc.akka.io/docs/akka/current/cluster-sharding.html#inspecting-cluster-sharding-state. Sending to the ActorRef retrieved with akka.cluster.sharding.ClusterSharding(system).shardRegion(typeName).