AspirePubSubDemo
A demo showing how to use the service bus emulator and a custom command for publishing messages through a queue
Install / Use
/learn @davidfowl/AspirePubSubDemoREADME
PubSubDemo - Azure Service Bus with Aspire Interactive Commands
This sample demonstrates how to use Aspire's interaction service to build custom commands with interactive UI. It shows how to send messages to an Azure Service Bus emulator through a custom command in the Aspire dashboard.
Components
- AppHost: Orchestrates the Azure Service Bus emulator and worker service
- WorkerService: Processes messages from the Service Bus queue
- Interactive Command: Send messages to Service Bus through the Aspire dashboard
Architecture
graph LR
A[Aspire Dashboard<br/>Custom Command<br/>'Publish Message'] --> B[Azure Service Bus<br/>Emulator<br/>- my-queue<br/>- dead-letter-queue]
B --> C[Worker Service<br/>Message Processor]
style A fill:#2196F3,stroke:#1976D2,stroke-width:2px,color:#fff
style B fill:#FF9800,stroke:#F57C00,stroke-width:2px,color:#fff
style C fill:#9C27B0,stroke:#7B1FA2,stroke-width:2px,color:#fff
Getting Started
Requirements
- .NET 9 SDK - https://dotnet.microsoft.com/en-us/download
- Docker - https://www.docker.com/get-started/
- Aspire CLI - https://learn.microsoft.com/en-us/dotnet/aspire/cli/install
Install Aspire CLI
Windows:
iex "& { $(irm https://aka.ms/aspire/get/install.ps1) }"
Linux/Mac:
curl -sSL https://aka.ms/aspire/get/install.sh | bash
Key Features
The interactive command demonstrates:
- Dropdown selection for available queues
- Text input for message content
- Visual feedback with success/error states
- Integration with Aspire's
IInteractionService
Customization
Add more queues in AppHost.cs:
serviceBus.AddServiceBusQueue("new-queue");
Resources
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
