Skip to content

Interface IInbox

Namespace: Cephalon.Abstractions.Data
Assembly: Cephalon.Abstractions.dll

Tracks inbound messages so consumer pipelines can enforce idempotent handling.

public interface IInbox

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)

messageId string

The stable inbound message identifier.

cancellationToken CancellationToken

The token that cancels the operation.

ValueTask<bool>

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)

message InboxMessage

The inbound message that completed processing.

cancellationToken CancellationToken

The token that cancels the operation.

ValueTask

A task that completes when the inbox has persisted the processed-message record.