IOutbox
interface
Namespace: Orleans.Durable.Messaging
Stages opaque durable messages alongside a grain's journaled business state.
public interface IOutboxRemarks
The outbox state machine's asynchronous write preparation establishes a durable self-wakeup before capture. Its write-completion callback makes captured messages eligible for dispatch. Each wakeup checks the grain's messages and their retry deadlines. Messages remain pending until the destination acknowledges durable acceptance, recognizes a duplicate, or reports a terminal delivery outcome. The outbox journals each send's
InboxMessage; every attempt, backpressure, and recovery reuse it, and retries end OutboxRetryTimeout after it. Applications use IOutbox and IOutboxMessageSource to stage crash-recoverable responses to terminal outcomes in the same journal write as retirement. Applications namespace command identities and define ordering in their protocols. Methods
Register(IOutboxMessageSource)Registers a source which provides messages sent throughIOutbox.Send(MessageId)Synchronously stages, for the grain's next journal write, a message which a registeredIOutboxMessageSourceprovides.Send(OutboxMessage)Synchronously stages an outgoing command for the grain's next journal write.Withdraw(MessageId)Synchronously stages, for the grain's next journal write, the removal of a pending message which a registeredIOutboxMessageSourceprovides.
