14 lines
379 B
C#
14 lines
379 B
C#
|
|
#nullable enable
|
||
|
|
|
||
|
|
using System.Data;
|
||
|
|
|
||
|
|
namespace PlanTempus.Core.Outbox;
|
||
|
|
|
||
|
|
public interface IOutboxService
|
||
|
|
{
|
||
|
|
Task EnqueueAsync(string type, object payload, IDbConnection? connection = null, IDbTransaction? transaction = null);
|
||
|
|
Task<List<OutboxMessage>> GetPendingAsync(int batchSize = 10);
|
||
|
|
Task MarkAsSentAsync(Guid id);
|
||
|
|
Task MarkAsFailedAsync(Guid id, string errorMessage);
|
||
|
|
}
|