IInbox
Namespace: Orleans.Durable.Messaging
public interface IInboxRemarks
Each message is dispatched to the first registered handler which can handle it. Handlers can be registered at any time. InboxExtensions registers typed subject handlers.
A grain receives messages by resolving its inbox during construction or activation setup, typically by constructor injection, so the inbox recovers with the grain's journal.
A handler decodes the body, performs asynchronous I/O, validates local results, and checks cancellation before the first shared business or journaled mutation. From that mutation until it returns, it executes synchronously: it applies safe-to-commit business changes, stages outgoing messages through IOutbox, and calls IInboxHandlerContext or IInboxHandlerContext. The runtime persists the outcome with those changes. Failures before a terminal operation follow the inbox retry and dead-letter policy.
Methods
Register(IInboxHandler)Registers a handler.Register(IInboxMessageSink)Registers a sink which accepts messages directly into application-owned journaled state.RegisterWakeup(Func<TimeSpan?>)Registers a callback which reports durable work held outside the inbox, such as messages which anIInboxMessageSinkaccepted, so the messaging wake-up reactivates the grain while that work remains.
