Skip to content

Instantly share code, notes, and snippets.

@toff63
Created November 25, 2015 13:21
Show Gist options
  • Save toff63/3a4f7c362c9c802884be to your computer and use it in GitHub Desktop.
Save toff63/3a4f7c362c9c802884be to your computer and use it in GitHub Desktop.
List of Running Actors
class RunningActors extends Actor with ActorLogging {
def receive = {
case "start" =>
log.info("Current Actors in system:")
self ! ActorPath.fromString("akka://Streams/user/")
case path: ActorPath =>
context.actorSelection(path / "*") ! Identify(())
case ActorIdentity(_, Some(ref)) =>
log.info(ref.toString())
self ! ref.path
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment