Table of Contents

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

service IOutboxHealthCheckService

The IOutboxHealthCheckService implementation to be used to monitor the outbox.

maxAge TimeSpan

The maximum message age, the check will fail when a message exceeds this age.

maxQueueLength int?

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

context HealthCheckContext
cancellationToken CancellationToken

Returns

Task<HealthCheckResult>