Dependent healthchecks #2651
Answered
by
DamianEdwards
Alex Todorov (alex-todorov-j2)
asked this question in
Q&A
|
I added a RabbitMQ dependency to the apiservice project: Then stopped the container for RabbitMQ in Docker and went to the /health endpoint of apiservice hoping it would now report Unhealthy. But it still returned Healthy. My question: is there a way to configure .NET Aspire for nested healthchecks like this? (You could go with your own healthcheck package/code but I'm curious what .NET Aspire has to offer.) |
Answered by
DamianEdwards
Mar 5, 2024
Replies: 1 comment 1 reply
|
If you use the Aspire Component for RabbitMQ and add the RabbitMQ client using the method provided by it, you should get a health check added for it. See https://learn.microsoft.com/dotnet/aspire/messaging/rabbitmq-client-component?tabs=dotnet-cli#health-checks for more details. |
1 reply
Answer selected by
alex-todorov-j2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use the Aspire Component for RabbitMQ and add the RabbitMQ client using the method provided by it, you should get a health check added for it. See https://learn.microsoft.com/dotnet/aspire/messaging/rabbitmq-client-component?tabs=dotnet-cli#health-checks for more details.