Skip to content

davidfowl/WebQWorker

Repository files navigation

WebQWorker

This is a sample showing the web-queue-worker pattern using .NET Aspire and Azure Service Bus.

The Web project exposes a /message API that will publish to a service bus queue. You can use the http file to send messages to the queue. The Worker project exposes a Blazor interactive server component to show messages being received from the service bus queue in real time. The application requires a real Azure Service Bus instance (there are no emulators).

The sample uses Aspire.Hosting.Azure.Provisoning to spin up a real Azure Service Bus instance in the specified subscription and location (see below for more details).

Requirements

The Azure subscription and location must be set in user secrets of the WebQWorker.AppHost project. Navigate to that directory and run the following commands:

dotnet user-secrets set Azure:SubscriptionId <subscriptionId>
dotnet user-secrets set Azure:Location <location>

Replace <subscriptionId> and <location> with appropriate values. Locations values look like "westus" (see https://learn.microsoft.com/en-us/dotnet/api/azure.core.azurelocation?view=azure-dotnet for more details).

Deployment

This example is can be deployed to Azure Container Apps using the Azure Developer CLI.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published