How to push telemetry data out of Azure Digital Twins to Event Hubs Endpoint? RRS feed

  • Question

  • Hello all,

    I am currently playing around with Azure Digital Twins and trying to increase my understanding of its capabilities. To do so, I plan on doing the following project:

    1) Pushing some telemetry data from a local simulator (running on my computer) to Azure Digital Twins.

    2) Routing the telemetry data from within Azure Digital Twins to an Event Hubs endpoint (also within Azure).

    3) Utilize the connection string within Event Hubs to pull down the telemetry data and process it accordingly.

    So far I have completed the following:

    1) Using the Azure Digital Twins Graph Viewer found here: https://github.com/Azure/azure-digital-twins-graph-viewer I have established my hierarchy and created some Spaces, Devices, and Sensors. With each device created I used Postman and a few GET requests to pull down their properties and corresponding connection strings. Afterwards, taking those connection strings and using a variation of this "sending messages from device to cloud script" at https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-dotnet I am able to send messages successfully to the devices within Azure Digital Twins. First Step Done!

    2) In regards to this article: https://docs.microsoft.com/en-us/azure/digital-twins/concepts-events-routing I see that there is an IoT Hub component within the Digital Twins resource that ingests data, and said data is then processed with User Defined Functions (UDFs) and routed to Endpoints outside of the Digital Twins. Where I am at now I have already created my Digital Twins resource and set up necessary permissions. I do not plan on performing any processing within Digital Twins at the moment, but simply passing telemetry data from Digital Twins' IoT Hub and to an established endpoint. - Unless UDFs and routing is strongly needed for this process(please correct me if they are).

    This is where I am stuck at, after browsing articles such as: https://docs.microsoft.com/en-us/azure/digital-twins/how-to-egress-endpoints I am confused on what I need to do within Azure Digital Twins to egress the data out of Azure Digital Twins and to Events Hubs resource. Any assistance regarding this and how to move forward would be much appreciated. Thank you in advance!

    Tuesday, June 11, 2019 2:23 PM


  • Hi SynovialQuill,

    If you don't need to process the data you can simply route raw device telemetry messages to Event Hubs. You will need to configure the endpoints like described here. And please note that upon the creation of a new endpoint, it might take up to 5 to 10 minutes to start receiving events at the endpoint.

    Let us know if you were successful?


    • Marked as answer by SynovialQuill Monday, June 17, 2019 7:53 PM
    Monday, June 17, 2019 4:44 PM

All replies