Receiving messages from the queue

In this section, we will create a console application that would receive messages from the queue. To create this application, follow these steps:

  1. Create a new console application (C#) and name it FlixOne.BookStore.MessageReceiver.
  2. Add the NuGet package for Azure Service Bus (same as added in the previous application).
  3. Add config keys/values to your App.Config file and a reference of System.Configuration to the project.
  4. Write the code to receive messages from the Azure Bus Service queue, so your program.cs file should look like this:
    using System;    using System.Configuration;    using Microsoft.ServiceBus.Messaging;    namespace FlixOne.BookStore.MessageReceiver    {        internal class Program        { private static void Main(string[] ...

Get Building Microservices with .NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.