Using AddMassTransitHostedService
a healthcheck configuration is added, but it always report unhealth even after I configured the endpoints as in the example. My project is a WebApi where I don't have my consumers in a separated startup.
You're using AddBus
, which has been deprecated in favor of UsingRabbitMQ
in v7.
When using AddBus
, you have to configure the health check manually (it is done automatically when using the new v7 syntax). The previous syntax documentation shows how to configure it, in short:
cfg.UseHealthCheck(context);
Must be added so that the health checks are reported to the hosted service.