Interface IInbox
Namespace: Cephalon.Abstractions.Data
Assembly: Cephalon.Abstractions.dll
Tracks inbound messages so consumer pipelines can enforce idempotent handling.
public interface IInboxMethods
Section titled “Methods”HasProcessedAsync(string, CancellationToken)
Section titled “ HasProcessedAsync(string, CancellationToken)”Determines whether the requested message identifier has already been recorded as processed.
ValueTask<bool> HasProcessedAsync(string messageId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”messageId string
The stable inbound message identifier.
cancellationToken CancellationToken
The token that cancels the operation.
Returns
Section titled “Returns”true when the message has already been processed; otherwise, false.
MarkProcessedAsync(InboxMessage, CancellationToken)
Section titled “ MarkProcessedAsync(InboxMessage, CancellationToken)”Records one inbound message as processed.
ValueTask MarkProcessedAsync(InboxMessage message, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”message InboxMessage
The inbound message that completed processing.
cancellationToken CancellationToken
The token that cancels the operation.
Returns
Section titled “Returns”A task that completes when the inbox has persisted the processed-message record.