In the previous section, we saw how we can use dispatchers to increase the message processing throughput by using the right dispatching policy. When a large number of actors are working in parallel to process the incoming stream of messages, there is need of an entity that directs the message from the source to the destination actor. This entity is called the router.
In Akka, a router is also a type of actor, which routes the incoming messages to the outbound actors. For the router, the outbound actors are also called routees. The router employs a different set of algorithms to route the messages to the routee actors:
In order to avoid ...