Show / Hide Table of Contents

    Interface IOutboxReader

    Exposes the methods to read from the outbox.

    Namespace: Silverback.Messaging.Producing.TransactionalOutbox
    Assembly: Silverback.Integration.dll
    Syntax
    public interface IOutboxReader
    Remarks

    Used by the IOutboxWorker.

    Methods

    AcknowledgeAsync(IEnumerable<OutboxMessage>)

    Called after the messages have been successfully produced to remove them from the outbox.

    Declaration
    Task AcknowledgeAsync(IEnumerable<OutboxMessage> outboxMessages)
    Parameters
    Type Name Description
    IEnumerable<OutboxMessage> outboxMessages

    The acknowledged messages.

    Returns
    Type Description
    Task

    A Task representing the result of the asynchronous operation.

    Remarks

    Used by the IOutboxWorker.

    GetAsync(int)

    Reads the specified number of messages from the outbox (according to the FIFO rule). The operation must be acknowledged for the messages to be removed.

    Declaration
    Task<IDisposableAsyncEnumerable<OutboxMessage>> GetAsync(int count)
    Parameters
    Type Name Description
    int count

    The number of items to be dequeued.

    Returns
    Type Description
    Task<IDisposableAsyncEnumerable<OutboxMessage>>

    A Task representing the result of the asynchronous operation. The task result contains the collection of OutboxMessage.

    Remarks

    Used by the IOutboxWorker.

    GetLengthAsync()

    Returns the total number of messages in the outbox.

    Declaration
    Task<int> GetLengthAsync()
    Returns
    Type Description
    Task<int>

    A Task<TResult> representing the asynchronous operation. The task result contains the number of messages in the outbox.

    Remarks

    Used by the IOutboxWorker.

    GetMaxAgeAsync()

    Gets a TimeSpan representing the time elapsed since the oldest message currently in the outbox was written.

    Declaration
    Task<TimeSpan> GetMaxAgeAsync()
    Returns
    Type Description
    Task<TimeSpan>

    The age of the oldest message.

    Remarks

    Used by the IOutboxWorker.

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini