dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.91k stars 475 forks source link

Add Service Bus emulator support #6737

Open sebastienros opened 2 days ago

sebastienros commented 2 days ago

Description

Add support for the Service Bus emulator https://techcommunity.microsoft.com/blog/messagingonazureblog/introducing-local-emulator-for-azure-service-bus/4304457

This PR introduces a custom model (Aspire.Hosting.Azure.ServiceBus.ApplicationModel) to configure the emulator, and the cloud service. There is another branch that was based on the CDK directly (and use it for the emulator JSON too) but some discussions led to create a custom, simplified one (not really simplified here for the sake of understanding limits), that is then converted to JSON for the emulator, and to CDK resources for provisioning. If the model is not sufficient (can be on purpose to limit it to what users use in most cases) then the emulator configuration can be defined in JSON directly via WithConfigJson, and the CDK resources can be enhanced with the existing ConfigureInfrastructure.

Fixes # (issue)

Checklist