Sending messages to the queue

In this section, we will create a console application that will actually send messages to the queue. To create this application, follow these steps:

  1. Create a new console application and name it FlixOne.BookStore.MessageSender using Visual Studio's new project (C#) template:

  1. Add the Nuget package Microsoft Azure Service Bus by right-clicking on the project.
  2. Open the app.config file and add the connection string and queue name.
    <appSettings>            <!-- Service Bus specific app settings for messaging     connections --> <add key="Microsoft.ServiceBus.ConnectionString" value="Endpoint=sb://flixone.servicebus.windows.net/;SharedAccessKeyN ...

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.