Table of Contents

Interface IOutboxProcessor

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Defines the contract for outbox pattern message processing, enabling reliable message delivery with transactional guarantees. The outbox processor handles deferred message publishing to ensure consistency between business operations and message delivery. This pattern prevents message loss and ensures at-least-once delivery semantics in distributed systems.

public interface IOutboxProcessor : IAsyncDisposable
Inherited Members
Extension Methods

Methods

DispatchPendingMessagesAsync(CancellationToken)

Processes and dispatches all pending messages from the outbox to their destination message brokers. This method implements the core outbox pattern functionality, ensuring transactional message delivery with proper error handling, retry logic, and delivery confirmation.

Task<int> DispatchPendingMessagesAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token to support graceful shutdown and timeout scenarios.

Returns

Task<int>

Task containing the number of messages successfully dispatched from the outbox.

Exceptions

InvalidOperationException

Thrown when the processor is not properly initialized.

Init(string)

Initializes the outbox processor with a unique dispatcher identifier for message ownership and processing coordination. This method sets up the processor context and prepares it for message processing operations.

void Init(string dispatcherId)

Parameters

dispatcherId string

Unique identifier for this dispatcher instance, used for message ownership and coordination.