How can I get the name of an Akka actor from within the actor itself?

Solution 1:

From an Actor you can use self to get the ActorRef.

val actorName = self.path.name

http://doc.akka.io/api/akka/2.2.3/#akka.actor.Actor

http://doc.akka.io/api/akka/2.2.3/#akka.actor.ActorRef

http://doc.akka.io/api/akka/2.2.3/#akka.actor.ActorPath