6 Discovery and routing

This chapter covers

  • Discovering other actors
  • Creating proxy actors

In this chapter, you learn how an actor can find another actor that is not its child. For example, suppose a manager creates workers to parse files, and later you develop a statistics collector that is only concerned with how many workers there are and how much work they do. If the collector is not embedded when the workers are created, how can it find the workers to request the information it needs? In other words, how can you add this new collector without tangling it up with the manager/worker part?

In Akka Typed, this problem has been solved with the receptionist. The idea is simple: the receptionist registers and subscribes actors to a specific key. ...

Get Akka in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.