HealthCheck for RabbitMQ

I had an instance where, for some reason, messages were no longer being “pumped” to a service using the RabbitMQ transport. It looked to be like there was no longer a connection to RabbitMQ.

I’m hosting my service is k8s and both of my pods were no longer connecting. Blowing them away and bringing up new instances fixed the issues.

What I’m wondering is if there is any way to incorporate connectivity to RabbitMQ as part of the .NET Core health check API. If possible, I’d like to use something NServiceBus-specific, otherwise I think I need to 1) specify the connection string in my config again in a way that the RabbitMQ client can use it and then 2) attempt to make a connection.

@Kevin_Sigmund NServiceBus 7 would always reconnect and this activity would be logged. Prior to version 7 the default behavior when a critical error occured was to stop processing messages:

What version of NServiceBus is this about and how are you hosting?

I do not have any knowledge on the .NET Core health check API so I leave it to other to comment on that :slight_smile: