Skip to Content
Azure Serverless Computing Cookbook
book

Azure Serverless Computing Cookbook

by Praveen Kumar Sreeram
August 2017
Intermediate to advanced
332 pages
8h 54m
English
Packt Publishing
Content preview from Azure Serverless Computing Cookbook

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

Azure Serverless Computing Cookbook - Second Edition

Azure Serverless Computing Cookbook - Second Edition

Praveen Kumar Sreeram, Jason Marston
Mastering Azure Serverless Computing

Mastering Azure Serverless Computing

Lorenzo Barbieri, Massimo Bonanni
Azure Serverless Computing Cookbook - Third Edition

Azure Serverless Computing Cookbook - Third Edition

Praveen Kumar Sreeram, Kasam Shaikh, Greg Leonardo

Publisher Resources

ISBN: 9781788390828Supplemental Content