Chapter 4. Typed Actors

In this chapter, we will cover typed actors, how to define them, how to create instances of them, how to send/receive messages, how to reply to messages, how to forward messages, and how to stop actors. We will also cover the use of dispatchers and routers with respect to typed actors.

In the previous chapter, we saw how the actors are defined and created, and how they process the messages. In the case of untyped actors, any message can be passed, meaning the service-level contracts are not strictly defined. So, if a message is passed to an untyped actor, and if the actor does not have any handling mechanism, then the message is relegated as an unhandled message.

In order to define strict contracts for actors that can respond ...

Get Akka Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.