Table of Contents

Class HealthCheckBuilderExtensions

Namespace
Silverback.Messaging.HealthChecks
Assembly
Silverback.Integration.HealthChecks.dll
public static class HealthCheckBuilderExtensions
Inheritance
HealthCheckBuilderExtensions
Inherited Members

Methods

AddConsumersCheck(IHealthChecksBuilder, ConsumerStatus, TimeSpan?, string, HealthStatus?, IEnumerable<string>?)

Adds a health check that verifies that all consumers are connected.

public static IHealthChecksBuilder AddConsumersCheck(this IHealthChecksBuilder builder, ConsumerStatus minHealthyStatus = ConsumerStatus.Connected, TimeSpan? gracePeriod = null, string name = "Consumers", HealthStatus? failureStatus = null, IEnumerable<string>? tags = null)

Parameters

builder IHealthChecksBuilder

The IHealthChecksBuilder.

minHealthyStatus ConsumerStatus

The minimum ConsumerStatus a consumer must have to be considered healthy.

gracePeriod TimeSpan?

The grace period to observe after each status change before a consumer is considered unhealthy.

name string

The health check name. The default is "Consumers".

failureStatus HealthStatus?

The HealthStatus that should be reported when the health check reports a failure. The default is Unhealthy.

tags IEnumerable<string>

An optional list of tags that can be used for filtering health checks.

Returns

IHealthChecksBuilder

The IHealthChecksBuilder so that additional calls can be chained.

AddOutboxCheck(IHealthChecksBuilder, TimeSpan?, int?, string, HealthStatus?, IEnumerable<string>?)

Adds a health check that monitors the outbox, verifying that the messages are being processed.

public static IHealthChecksBuilder AddOutboxCheck(this IHealthChecksBuilder builder, TimeSpan? maxAge = null, int? maxQueueLength = null, string name = "Outbox", HealthStatus? failureStatus = null, IEnumerable<string>? tags = null)

Parameters

builder IHealthChecksBuilder

The IHealthChecksBuilder.

maxAge TimeSpan?

The maximum message age, the check will fail when a message exceeds this age. The default is 30 seconds.

maxQueueLength int?

The maximum amount of messages in the queue. The default is null, meaning unrestricted.

name string

The health check name. The default is "OutboundQueue".

failureStatus HealthStatus?

The HealthStatus that should be reported when the health check reports a failure. The default is Unhealthy.

tags IEnumerable<string>

An optional list of tags that can be used for filtering health checks.

Returns

IHealthChecksBuilder

The IHealthChecksBuilder so that additional calls can be chained.