Table of Contents

Class OutboxHealthCheckService

Namespace
Silverback.Messaging.HealthChecks
Assembly
Silverback.Integration.dll

Checks that the outbox is being processed at a sustainable pace.

public class OutboxHealthCheckService : IOutboxHealthCheckService
Inheritance
OutboxHealthCheckService
Implements
Inherited Members

Constructors

OutboxHealthCheckService(IOutboxReader)

Initializes a new instance of the OutboxHealthCheckService class.

public OutboxHealthCheckService(IOutboxReader queueReader)

Parameters

queueReader IOutboxReader

The IOutboxReader.

Methods

CheckIsHealthyAsync(TimeSpan, int?)

Checks the age of the messages stored in the transactional outbox and optionally the queue length.

public Task<bool> CheckIsHealthyAsync(TimeSpan maxAge, int? maxQueueLength = null)

Parameters

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.

Returns

Task<bool>

A Task<TResult> representing the asynchronous operation. The task result contains a boolean value indicating whether the check is successful.