Skip to Content
Hands-On Azure for Developers
book

Hands-On Azure for Developers

by Kamil Mrzygłód
November 2018
Intermediate to advanced
606 pages
15h 7m
English
Packt Publishing
Content preview from Hands-On Azure for Developers

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); ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Implementing Azure: Putting Modern DevOps to Use

Implementing Azure: Putting Modern DevOps to Use

Florian Klaffenbach, Oliver Michalski, Markus Klein, Mohamed Wali

Publisher Resources

ISBN: 9781789340624Supplemental Content