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