Search code examples
azureazure-functionsazure-iot-hub

Azure Function miss IoT trigger


I am using the Azure function to process message from IOT hub and output to Blob storage. enter image description here

But the function missed IOT messages when I send in high frequency. For example, I send 30 messages from 20:40:16 to 20:40:23 but only 3 are processed and stored in to the Blob storage and I have no ideal where the rest 27 went. enter image description here

I am using the function consumption plan and Azure declares it will auto scaling depends on the load. But from the above activity log, it only one thread is running and not even queue the input and cause some message lost.

So, what I should do to catch all messages from IOT hub?


Solution

  • Found the solution myself. The trigger need to change from Azure Event Hubs to Event Grid Trigger as the images show below.

    Azure Event Hubs Azure Grid Trigger