I am working on the IoT project where we are using Azure IoT hub for the device communications. We had a requirment for the file upload from the IoT Device to Cloud. So, I started to analyze the file upload facitiliy of the IoT Hub ( IoT hub file upload feature). We configured the blob Storage account container and enabled the file upload notification in IoT hub. From what I understand, whenever we upload the file to blob storage, the notification arrives to "messages/servicebound/fileNotifications".
My question here is,
What is the efficient way to consume the notifications?
1.) Do I need to continously poll the endpoint("messages/servicebound/fileNotifications") in Webjob like this(IoT hub File Upload feature)?
2.) Or shall I create Blob Trigger Webjob to get triggered whenever the changes occurred in Blob storage?
3.) Is there any efficient way to setup this notifications?
Note: we are using webjob instead of Azure functions since we are already having the Azure web app instance running. To reduce the cost we are using the Webjobs instead of Azure functions.
Please help me to move forward.
Thanks in advance!
Note, that the Azure IoT Hub will send only the ACK notification message when the upload process has been successful completed. That's the different from the C2D messaging, where a notification message can be also NACK.
Note also, when the Azure IoT Hub is notified by device, that the uploading process is successful completed (doesn't care if the real blob has been uploaded, but the file already exist in the container), the notification ACK message is sent it.
Based on the built-in behavior of the Upload File Notification feature in the Azure IoT Hub, the Azure Event Grid is a good choice for event driven notification of the uploaded blob file. In this choice, the File notification settings can be turned Off.