Mailbox types in Akka

Like dispatchers, mailboxes are central to the functionality within Akka's actor system. Every actor instance has a mailbox (be it isolated or shared) that acts as a queue, feeding the work that the actor does. The mailbox always processes one message at a time, serially, which is a guarantee that enables the safe concurrent programming with actors. Since there are a few different flavors of mailboxes, it makes sense to discuss them briefly here so that you can understand at a high level which ones to use for what situations. There are two major of categories of mailbox types that will be discussed here: unbounded and bounded.

Unbounded mailboxes

As their name implies, these mailboxes are not bound by any size limit. You can ...

Get Mastering Akka 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.