Interface IProcessingTrackingInboxStore
An optional capability for IInboxStore implementations that durably persist the in-flight Processing status of a message before its handler executes.
public interface IProcessingTrackingInboxStore
- Extension Methods
Remarks
This is a segregated capability interface (composition, NOT inheritance of IInboxStore) so that IInboxStore stays within the Interface Segregation threshold. Inbox stores that support durable Processing tracking implement this interface in addition to IInboxStore.
Persisting Processing durably is what makes the inbox middleware's at-most-once concurrency guard and stuck-processing timeout functional: without it, the Processing state is only mutated in memory and never observable by a second concurrent consumer, so the guard is dead code.
Methods
MarkProcessingAsync(string, string, CancellationToken)
Durably marks the inbox entry for the specified message and handler as Processing before its handler executes.
ValueTask MarkProcessingAsync(string messageId, string handlerType, CancellationToken cancellationToken)
Parameters
messageIdstringThe unique identifier of the message being processed.
handlerTypestringThe fully qualified type name of the handler processing the message.
cancellationTokenCancellationTokenToken to monitor for cancellation requests.
Returns
- ValueTask
A task that represents the asynchronous mark-processing operation.
Remarks
Implementations persist the transition (and the attempt timestamp used by the stuck-processing
timeout) so that a concurrent delivery of the same messageId/handlerType
observes the durable Processing state and is skipped by the at-most-once guard.
Exceptions
- ArgumentException
Thrown when
messageIdorhandlerTypeis null or empty.