Developing the Azure Function - Queue trigger

  1. Create a new Azure Function named ProcessData using the Queue trigger that monitors the trigger named myqueuemessages. This is how the Integrate tab should look after you create the function:
  1. Replace the default code with the following code:
        using System;        public static void Run(string myQueueItem,          TraceWriter log)        {           if(Convert.ToInt32(myQueueItem)>50)           {              throw new Exception(myQueueItem);           }           else           {              log.Info($"C# Queue trigger function                processed: {myQueueItem}");           }        }
  1. The preceding Queue trigger logs a message with the content of the Queue (it's just a numerical index) for the first 50 messages ...

Get Azure Serverless Computing Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.