Mail box vs mailing address

What is the difference between two?Why do we need both if both can hold messages?

Not sure what you mean by mailing address, that’s not really a name we use in Akka – I assume you mean an Actor’s address+path?

In short:

  • mailbox – what stores messages (it’s basically a queue, to which others insert messages, and the actor pulls messages from it)
  • address / actor path – an abstract “path” or “name”; where an actor is located in the actor system; it’s basically a path representation of where the actor lives in the tree hierarchy that the ActorSystem is.
1 Like

As actors don’r directly invoke each other, they just put messages in each other’s mail box, so what role address path plays in overall scheme? Is it needed by parent actor to supervise its child actors.

It’s for understanding your system – in runtime paths are used in logs, as well as when things fail you know which actor it was etc etc. It is a form of structuring and naming your systems structure.

1 Like

It’s also described rather thoroughly in the documentation.