Eugene Loy
Eugene Loy

Reputation: 12416

Akka: getting info about current actor hierarchy

For debug purposes I'd like to have a programmatic way to get tree of non-terminated actors that are currently in the system.

Anything that can give\can be converted to textual represenatation of the current state of actor hierarchy will also be sufficient.

How can I implement this?

Upvotes: 0

Views: 99

Answers (2)

SeanW
SeanW

Reputation: 26

You can traverse the actor hierarchy recursively but since the number of actors in a given system are usually elastic, the answer may not be reliable.

Upvotes: 0

dvim
dvim

Reputation: 2253

You can't traverse actor hierarchy directly. However you could subscribe your every actor to Event Bus and then have one actor to send a Path Report message to the Event Bus and gather all the responses.

Upvotes: 1

Related Questions