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:
name: The health check name. Default isactivemq.failureStatus: TheHealthStatusthat should be reported when the health check fails. Default isHealthStatus.Unhealthy.tags: A list of tags that can be used to filter sets of health checks.timeout: ASystem.TimeSpanrepresenting the timeout of the check.