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
outboxDataTcancellationTokenCancellationToken
Returns
Type Parameters
TThe 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
idGuidcancellationTokenCancellationToken
Returns
GetManyAsync<T>(int, CancellationToken)
Return up to batchSizes oldest entries of type T.
Task<IReadOnlyList<OutboxEntry>> GetManyAsync<T>(int batchSizes, CancellationToken cancellationToken)
Parameters
batchSizesintcancellationTokenCancellationToken
Returns
Type Parameters
T