ℹ️ This repository contains a solution for sending and retrieving messages to an Azure Service Bus queue. For a detailed walkthrough, check out the post on my website, Introduction to Azure Service Bus,
This demonstration displays ten stock tickers and their prices.
One app sends a list of prices to an Azure Service Bus queue, and the other app retrieves and displays the data in real time.
There are two projects in this solution:
StockPrices.Consumer: A Blazor Server app that retrieves stock prices in messages from an Azure Service Bus queue and displays the prices in real time.StockPrices.Producer: A console app that sends the prices of 10 stock tickers to an Azure Service Bus queue every second.
The following is required to run the demo:
- .NET 8 SDK installed.
- An Azure account with permission to create Service Bus resources.
- An Azure Service Bus namespace and queue (connection string + queue name).
-
Clone the repository.
git clone https://github.com/nfulleylove/azure-service-bus-queue-demo.git cd azure-service-bus-queue-demo
-
Configure Azure Service Bus.
Create a Service Bus namespace and queue in the Azure portal.
Retrieve the connection string(s) and queue name.
-
Update application settings.
Add the connection string for your queue(s) to User Secrets or app settings for each project.
-
Run each project.
Run each project in parallel to see the stock prices update in real time.
