Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidfowl/webqworker
https://github.com/davidfowl/webqworker
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/davidfowl/webqworker
- Owner: davidfowl
- Created: 2023-11-08T19:44:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-16T21:26:43.000Z (10 months ago)
- Last Synced: 2024-04-14T02:28:18.326Z (8 months ago)
- Language: C#
- Size: 48.8 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WebQWorker
This is a sample showing the [web-queue-worker](https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/web-queue-worker) pattern using .NET Aspire and Azure Service Bus.
The [_Web_](/Web/) project exposes a `/message` API that will publish to a service bus queue. You can use the [http file](/Web/Requests.http) to send messages to the queue.
The [_Worker_](/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.ServiceBus](https://www.nuget.org/packages/Aspire.Hosting.Azure.ServiceBus) to spin up a real Azure Service Bus instance in the specified subscription and location (see [below](#requirements) for more details).
## Requirements
The Azure subscription and location must be set in user secrets of the [_WebQWorker.AppHost_ project](/WebQWorker.AppHost/).
Navigate to that directory and run the following commands:```
dotnet user-secrets set Azure:SubscriptionId
dotnet user-secrets set Azure:Location
```Replace \ and \ 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](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd).