Open utterances-bot opened 3 years ago
This will process all messages that you are able to wait for (Console.ReadKey() or Thread.Sleep(1000)). I'm still trying to figure out how to read all messages already in the queue without having to specify a wait or in a synchronous manner.
With Console.ReadKey()
, as used in the example, the console application remains up and running until you stop it. In the meanwhile, all the messages are being processed, because we are processing them with an event handler, not a "called" method.
_ordersProcessor.ProcessMessageAsync += PizzaItemMessageHandler;
The event handler listens for events and asynchronously performs the related operations as soon as something happens.
Azure Service Bus and C# - an introduction - Code4IT
Azure Service bus is a message broker generally used for sharing messages between applications. In this article, we're gonna see an introduction to Azure Service Bus, and how to work with it with .NET and C#
https://www.code4it.dev/blog/azure-service-bus-introduction