Show / Hide Table of Contents

    Class ConsumersHealthCheckService

    Checks that all the consumers are connected.

    Inheritance
    object
    ConsumersHealthCheckService
    Implements
    IConsumersHealthCheckService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.HealthChecks
    Assembly: Silverback.Integration.dll
    Syntax
    public class ConsumersHealthCheckService : IConsumersHealthCheckService

    Constructors

    | Improve this doc View source

    ConsumersHealthCheckService(IBrokerCollection, IHostApplicationLifetime)

    Initializes a new instance of the ConsumersHealthCheckService class.

    Declaration
    public ConsumersHealthCheckService(IBrokerCollection brokerCollection, IHostApplicationLifetime applicationLifetime)
    Parameters
    Type Name Description
    IBrokerCollection brokerCollection

    The collection containing the available brokers.

    IHostApplicationLifetime applicationLifetime

    The IHostApplicationLifetime used to track the application shutdown.

    Methods

    | Improve this doc View source

    GetDisconnectedConsumersAsync(ConsumerStatus, TimeSpan, Func<IConsumerEndpoint, bool>?)

    Checks the status of all the consumers and returns a collection containing the consumer instances that don't appear to be fully connected (Status >= Ready).

    Declaration
    public Task<IReadOnlyCollection<IConsumer>> GetDisconnectedConsumersAsync(ConsumerStatus minStatus, TimeSpan gracePeriod, Func<IConsumerEndpoint, bool>? endpointsFilter)
    Parameters
    Type Name Description
    ConsumerStatus minStatus

    The minimum ConsumerStatus a consumer must have to be considered fully connected.

    TimeSpan gracePeriod

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

    Func<IConsumerEndpoint, bool> endpointsFilter

    An optional filter to be applied to the endpoints to be tested.

    Returns
    Type Description
    Task<IReadOnlyCollection<IConsumer>>

    A Task<TResult> representing the asynchronous operation. The task result contains the consumers that aren't fully connected.

    Implements

    IConsumersHealthCheckService
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini