-
Notifications
You must be signed in to change notification settings - Fork 514
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
Add Service Bus emulator support #6737
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # Aspire.sln # src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusExtensions.cs
src/Aspire.Hosting.Azure.ServiceBus/ApplicationModel/OptionalValue.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/ApplicationModel/ServiceBusClientAffineProperties.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/ApplicationModel/ServiceBusClientAffineProperties.cs
Outdated
Show resolved
Hide resolved
…alue.cs Co-authored-by: David Pine <david.pine@microsoft.com>
src/Aspire.Hosting.Azure.ServiceBus/ApplicationModel/OptionalValue.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.EventHubs/EventHubsEmulatorContainerImageTags.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/Aspire.Hosting.Azure.ServiceBus.csproj
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusEmulatorResource.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/ApplicationModel/ServiceBusClientAffineProperties.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/ApplicationModel/ServiceBusTopic.cs
Outdated
Show resolved
Hide resolved
playground/AzureServiceBus/ServiceBusWorker/ServiceBusWorker.csproj
Outdated
Show resolved
Hide resolved
How close is this to merging |
I pushed the wrong branch :/ I wanted to update the EventHubs one and not lose my nice green build ... reverting |
489d64d
to
29a8262
Compare
If you ask me it's perfect. But I haven't had an approval yet so I must be wrong |
I want to play with it 🙂. I think this is a good enough strawman to decide on follow ups. Should we mark some of these APIs experimental to get some leeway to change them? |
Check the playground app I created. And also the provisioning part, it should provision queues/topics... There is a callback to customize the CDK objects, adding properties that don't matter locally, or are not available in the "common" model between the emulator and cdk. |
src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusExtensions.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusExtensions.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusExtensions.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM! Nice work here. This is going to be a very useful feature that our customers will enjoy. Let's get it merged.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
The functions test is failing |
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 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(path)
, customized withRunAsEmulator(c => c.ConfigJson(JsonNode))
, and the CDK resources can be enhanced with the existingConfigureInfrastructure()
.Fixes #6605
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):Microsoft Reviewers: Open in CodeFlow