How do I configure a Priority Mailbox (Akka Typed)?

How do I configure the message priorities of a Priority Mailbox (eg UnboundedStablePriorityMailbox) in Akka Typed? Is that done through the configuration file, or at “runtime” through instantiating / extending the Mailbox? Cheers.

PS: I’m positive it can be done at runtime, but I was wondering if I’m missing something, since they all have a Configuration name

You should be able to define the mailbox with the MailboxSelector

spawn(behavior, MailboxSelector.fromConfig("prio-mailbox"))

and the config something like

prio-mailbox {
  mailbox-type = "akka.dispatch.UnboundedStablePriorityMailbox"


1 Like