Package reference page maintained from the source documentation in src/HealthChecks.ActiveMQ.

ActiveMQ Health Check

This health check verifies the ability to connect to an Apache ActiveMQ Classic broker using Apache.NMS.ActiveMQ.

Example Usage

public void ConfigureServices(IServiceCollection services)
{
    services
        .AddHealthChecks()
        .AddActiveMQ("activemq:tcp://localhost:61616");
}

For authenticated brokers:

public void ConfigureServices(IServiceCollection services)
{
    services
        .AddHealthChecks()
        .AddActiveMQ(
            "activemq:tcp://localhost:61616",
            options =>
            {
                options.UserName = "admin";
                options.Password = "admin";
                options.RequestTimeout = TimeSpan.FromSeconds(5);
            });
}

If the application already owns the IConnectionFactory, register it and let the health check resolve it:

public void ConfigureServices(IServiceCollection services)
{
    services
        .AddSingleton<IConnectionFactory>(new Apache.NMS.ActiveMQ.ConnectionFactory("activemq:tcp://localhost:61616"))
        .AddHealthChecks()
        .AddActiveMQ();
}

Like all IHealthChecksBuilder extensions, the following parameters may be overridden:

<<