Skip to main content
Table of Contents

Interface IOutboxRepository

Namespace
Stratara.Abstractions.Outbox
Assembly
Stratara.Abstractions.dll

Repository over the outbox_entry table — durable queue of messages that couldn't be published directly to the bus and are retried by the outbox worker.

public interface IOutboxRepository
Extension Methods

Methods

AddAsync<T>(T, CancellationToken)

Persist an outbox entry for later delivery.

Task AddAsync<T>(T outboxData, CancellationToken cancellationToken)

Parameters

outboxData T
cancellationToken CancellationToken

Returns

Task

Type Parameters

T

The serialised payload type (command envelope or event bundle).

DeleteAsync(Guid, CancellationToken)

Remove an entry once it has been published successfully.

Task DeleteAsync(Guid id, CancellationToken cancellationToken)

Parameters

id Guid
cancellationToken CancellationToken

Returns

Task

GetManyAsync<T>(int, CancellationToken)

Return up to batchSizes oldest entries of type T.

Task<IReadOnlyList<OutboxEntry>> GetManyAsync<T>(int batchSizes, CancellationToken cancellationToken)

Parameters

batchSizes int
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<OutboxEntry>>

Type Parameters

T