- 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:
- 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}"); } }
- The preceding Queue trigger logs a message with the content of the Queue (it's just a numerical index) for the first 50 messages ...