0
votes

I am building an IoT solution that has devices that periodically upload sound files to Azure through the IoT Hub. That is working alright and the file is being uploaded. But I immediately(after the upload) need to run some analysis on this file using Azure Functions. So I basically need a notification once the file upload is done, telling me the device id, the uri of the file etc. IoT Hub has the file notification feature but it seems this must be polled periodically to receive the notification, I don't want to set up another service just to poll for upload notification.

I have thought of attaching the Function trigger to the blob storage used by the IoT Hub but the solution am building will have an IoT Hub (and consequently an accompanying Blob Storage) per region to reduce latency, so it would be inefficient to duplicate the Function logic for each blob.

Is there a way to wire this setup up, so that I load all the notification from the multiple IoT Hubs to a single Event Hub, from where they can trigger a single Azure Function for processing ?

1

1 Answers

1
votes

Have a look at the Azure Event Grid with a Fan-IN pattern, where multiple blob storage event subscriptions will use the same handler endpoint (EventGridTrigger function or Event Hub resource).

The following screen snippet shows this pattern: enter image description here