Creating a service that reads from Azure Queue Storage
The Codebreaker.Bot
project we used previously offers a minimal API service. With the updates, a REST API isn’t needed – a simple console application will do. Just create a new console application (dotnet new console -o Codebreaker.BotQ
) and copy the source code from Codebreaker.Bot
. The new bot will also use gRPC for communication with the game APIs service. Because this isn’t an ASP.NET Core application, these NuGet packages are needed for gRPC:
Google.Protobuf
Grpc.Net.ClientFactory
Grpc.Tools
For the DI container, we also need Microsoft.Extensions.Hosting
, and for the .NET Aspire Storage Queues component, we need Aspire.Azure.Storage.Queues
.
Next, we’ll update the app model.
Defining app-model for Azure Storage
With the AppHost project, reference the newly created project, Codebreaker.BotQ
, and add the Aspire.Hosting.Azure.Storage
NuGet package so that you can use...