Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddAzureServiceBusQueue relies on the knowledge queues and topics exist #2321

Open
sebastienros opened this issue Nov 23, 2024 · 0 comments
Open

Comments

@sebastienros
Copy link

sebastienros commented Nov 23, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant