I have created akka system. Suppose there are some actors in it. How I can print all actors from akka system with their path? (for debug purposes)
This reply by Roland Kuhn suggests that this isn't a completely trivial problem, but you can get pretty close (for actors that will reply to messages in a reasonable time) using the Identify-ActorIdentity request-response protocol that all actors obey.
Some untested code thrown together to illustrate the idea:
import akka.actor._
def receive = {
case 'listActors =>
context.actorSelection("/user/*") ! Identify()
case path: ActorPath =>
context.actorSelection(path / "*") ! Identify()
case ActorIdentity(_, Some(ref)) =>
log.info("Got actor " + ref.path.toString)
self ! ref.path
}