MailboxObserver

Observer hook for an AgentMailbox. Called for every successful delivery (whether the message was queued or handed off directly to a waiting receiver) and for every successful consumption (whether via tryTake, consume, or Waiter match). Used by AgentPerformance to gather mailbox traffic statistics without coupling the mailbox to the statistics machinery.

Default methods are no-ops so observers only need to override what they care about.

Functions

Link copied to clipboard
open fun onMessageConsumed(message: M, currentSize: Int)
Link copied to clipboard
open fun onMessageDelivered(message: M, currentSize: Int)