Interface IDeadLetterStoreAdmin
- Namespace
- Excalibur.Dispatch.ErrorHandling
- Assembly
- Excalibur.Dispatch.Abstractions.dll
Provides administrative operations for the dead letter store.
public interface IDeadLetterStoreAdmin
- Extension Methods
Methods
CleanupOldMessagesAsync(int, CancellationToken)
Cleans up old dead letter messages for the ambient tenant, by retention policy.
Task<int> CleanupOldMessagesAsync(int retentionDays, CancellationToken cancellationToken)
Parameters
retentionDaysintEntries dead-lettered longer ago than this are removed.
cancellationTokenCancellationTokenToken to monitor for cancellation requests.
Returns
Remarks
Confined to the ambient tenant, and this is the operation where that matters most on this interface. A retention sweep matches rows by age, so an implementation that omits the tenant term deletes every tenant's aged entries whenever any one tenant's retention runs -- silent data loss rather than a disclosure, and unrecoverable, since a dead-lettered message is the only remaining copy. Scoping only the read paths does not remove that problem, it relocates it.
GetCountAsync(CancellationToken)
Gets the count of messages in the dead letter queue, for the ambient tenant.
Task<long> GetCountAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenToken to monitor for cancellation requests.
Returns
Remarks
Confined to the ambient tenant, on the same terms as every read on IDeadLetterStore. The confinement is restated here rather than inherited, because this is a separate interface and an implementer writing it does not necessarily read the one above. An estate-wide total is a disclosure even though it returns no message content: it tells one tenant how many failures every other tenant has.