IoT Hub and Webhooks RRS feed

  • Question

  • I want to to connect my raspberry pi to Azure IoT Hub. So that I can receive my telemetry data on IoT Hub (which is working for the moment). Afterwords I want to send this telemetry data with pub/sub to a third-party webhook. I've already been searching through the documentation of Azure but wasn't able to find a clearly answer or there were just to many workarounds which doesn't feel the right solution. Could anyone give an idea of how I could accomplish this? 
    Tuesday, February 27, 2018 10:45 AM

All replies

  • Hello Sjeah07,

    Maybe you can check Azure Event Grid.

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, February 28, 2018 2:37 AM
  • This scenario can be implemented with IotHub and some REST endpoint. However I would recommend to rethink you approach, because it might not be the best architectural approach.

    Here is why.

    IotHub is extremely optimized for high scale (lot of devices, messages etc.). If you redirect all of events from IotHub to some REST service (web-hook) you will most likely crash that service. This is why you will not find any document, which describes how to do this.

    Typically you should rather implement some kind of compute logic  between iothub and service, which hosts web hook. 

    You can use for this scenario, for example Azure Functions (there are many other options). Azure function would receive events and based on some logic you will forward only subset of your events to web hook.

    Following blog post describe how to do this: https://developers.de/2018/03/01/serverless-how-to-read-data-from-iothub/

    I have recommended Azure Function, not because it is cool Serverless technology. Reason is that Azure Function provides a binding for EventHub endpoint (which is compatible to IotHub) with support for EvetProcessorHost. EventProcessorHost is API developed by MS messaging team, which simplifies this scenario. It will automatically scale-up and -down for you depending on message load. This is probably not a feature of any web hook available on internet (my excuse if there are few of them :)).

    Hope this helps.

    Damir Dobric

    Sunday, March 18, 2018 10:48 AM