Developing an application using Queue Storage

For the purpose of presenting Queue Storage, I created two applications:

  • Producer
  • Consumer

Producer will create and push messages, which will then be consumed by Consumer. Here you can find the code of the Producer app:

using System;using Microsoft.WindowsAzure.Storage;using Microsoft.WindowsAzure.Storage.Queue;namespace QueueStorage.Producer{    internal class Program    {        private static void Main()        {            var storageAccount = CloudStorageAccount.Parse("UseDevelopmentStorage=true");            var queueClient = storageAccount.CreateCloudQueueClient();            var queue = queueClient.GetQueueReference("orders");                        queue.CreateIfNotExists();            var message = new CloudQueueMessage($"New order ID: {Guid.NewGuid()}"); queue.AddMessage(message); ...

Get Hands-On Azure for Developers 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.