You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While adding Service Bus emulator support for Aspire (dotnet/aspire#6737) I faced the issue to have to create health checks on the configured queues and topics, but not be able to conditionally add these health checks.
What happens is that we can correctly pass a lambda in the health checks registrations to provide the name of a queue or a topic, but if there are no queues or no topics then we have registered a health check and nothing to provide. The same way we can't provide multiple health checks (several queues or several topics).
How I solved it is by creating a custom health check that accepts a factory for a list of queues/topics instead. Technically the only difference would be that the current factories would return a list of values, potentially empty, instead of exactly one value which can't be null.
The text was updated successfully, but these errors were encountered:
While adding Service Bus emulator support for Aspire (dotnet/aspire#6737) I faced the issue to have to create health checks on the configured queues and topics, but not be able to conditionally add these health checks.
What happens is that we can correctly pass a lambda in the health checks registrations to provide the name of a queue or a topic, but if there are no queues or no topics then we have registered a health check and nothing to provide. The same way we can't provide multiple health checks (several queues or several topics).
How I solved it is by creating a custom health check that accepts a factory for a list of queues/topics instead. Technically the only difference would be that the current factories would return a list of values, potentially empty, instead of exactly one value which can't be null.
The text was updated successfully, but these errors were encountered: