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 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.