Class OutboxHealthCheck
- Namespace
- Silverback.Messaging.HealthChecks
- Assembly
- Silverback.Integration.HealthChecks.dll
Monitors the outbox, verifying that the messages are being processed.
public class OutboxHealthCheck : IHealthCheck
- Inheritance
-
OutboxHealthCheck
- Implements
- Inherited Members
Constructors
OutboxHealthCheck(IOutboxHealthCheckService, TimeSpan, int?)
Initializes a new instance of the OutboxHealthCheck class.
public OutboxHealthCheck(IOutboxHealthCheckService service, TimeSpan maxAge, int? maxQueueLength = null)
Parameters
serviceIOutboxHealthCheckServiceThe IOutboxHealthCheckService implementation to be used to monitor the outbox.
maxAgeTimeSpanThe maximum message age, the check will fail when a message exceeds this age.
maxQueueLengthint?The maximum amount of messages in the queue. The default is null, meaning unrestricted.
Methods
CheckHealthAsync(HealthCheckContext, CancellationToken)
public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Parameters
contextHealthCheckContextcancellationTokenCancellationToken