How do you check the health of the ActiveMQ service?
public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default(CancellationToken))
{
// Health Check ActiveMq Code?
return HealthCheckResult.Healthy();
}
CodePudding user response:
A best practice is to send a message and receive it. This verifies everything -- SSL, authentication, authorization, etc.
Especially, if you have a cluster. You can send one message to broker 1 of the cluster and consume it from broker 2 in the cluster.