Bounded Mailbox Configuration#
bounded-mailbox configuration specifies the settings for the bounded mailbox type, which limits the maximum number of messages that can be stored in an actor's mailbox.
mailbox-type = "akka.dispatch.NonBlockingBoundedMailbox"
mailbox-type setting determines the type of mailbox used. Here, the
NonBlockingBoundedMailbox type is selected. This mailbox type provides a capacity-constrained, non-blocking, and thread-safe message queue for your actors.
mailbox-capacity = 5000
mailbox-capacity setting specifies the maximum number of messages that the mailbox can hold. In this configuration, the capacity is set to 5000 messages. Once this limit is reached, the mailbox refuses to accept more messages until space becomes available.
bounded-mailbox configuration helps control the load on your actor system by limiting the number of unprocessed messages an actor can receive, preventing it from becoming overwhelmed. It is a vital configuration for ensuring the resilience and stability of your system.