Search Results for

    Show / Hide Table of Contents

    Interface IInboxStore

    Abstraction for storing and tracking incoming message ids to guarantee exactly‑once processing.

    Namespace: Chapar.Core.Inbox
    Assembly: Chapar.Core.dll
    Syntax
    public interface IInboxStore

    Methods

    | Edit this page View Source

    MarkAsProcessedAsync(InboxMessage, CancellationToken)

    Marks a previously reserved message as completely processed. Called only after the handler has finished without exception.

    Declaration
    Task<bool> MarkAsProcessedAsync(InboxMessage message, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    InboxMessage message

    The inbox message record that should be updated.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<bool>

    true if the message was marked for the first time; false if it was already processed.

    | Edit this page View Source

    TryReserveAsync(string, string, CancellationToken)

    Attempts to atomically reserve an incoming message for processing. When the method returns true the caller is the exclusive processor of the message; when it returns false the message has already been reserved by another consumer.

    Declaration
    Task<bool> TryReserveAsync(string messageId, string consumerTypeName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string messageId

    The unique identifier of the incoming message.

    string consumerTypeName

    The fully qualified type name of the consumer that will handle the message.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<bool>

    true if the reservation was successful; otherwise false.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2026