Chapter 9. Routing messages

In this chapter

  • Using the enterprise integration router pattern
  • Scaling with Akka routers
  • Building a state-based router with become/unbecome

In the previous chapter we looked at enterprise integration patterns as a way to connect actors to solve a wide range of problems. Yet all those approaches involved processing incoming messages in the same way. But often, you need to handle messages differently.

Routers are essential when you want to scale up or out. For example, when you want to scale up, you need multiple instances of the same task, and routers will decide which instance will process the received message. We’ll start this chapter by describing the enterprise router pattern and examine the three reasons ...

Get Akka in Action 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.