Forum Discussion
saramonteiro
Jan 10, 2022Copper Contributor
What's the best way for an external application to read data from IoT Hub?
Hi everyone! I have been studying integration between IoT Hub to external applications and the available endpoints and SDKs. AFAIK, the current suitable way to externally read telemetry data fro...
- Jan 11, 2022Hi Sara
What I would suggest is to consider how you want to read telemetry based on the type of data you want and how and where it will be consumed. IoT Hub allows to route telemetry data to different types of endpoints (Event Hub, Message Bus topics or queues, Azure Storage) which might be more suited for consumption by apps than the built-in Event Hub compatible endpoint based on your scenario and needs. Read more about his here: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-d2c
You can also leverage the integration with Events Grid which offers an events model (rather than messages model): https://docs.microsoft.com/azure/iot-hub/iot-hub-event-grid-routing-comparison
At the end of the day there is no good or bad way of consuming data coming from devices through IoT Hub.
Note that the Service SDKs for IoT Hub are designed to manage the instance of IoT Hub and manage the attached devices (provisioning, Twins, Direct Methods), but do not support telemetry (D2C) consumption because of exactly this (there is not a single way to consume messages/events from devices).
OlivierBloch
Jan 11, 2022Iron Contributor
Hi Sara
What I would suggest is to consider how you want to read telemetry based on the type of data you want and how and where it will be consumed. IoT Hub allows to route telemetry data to different types of endpoints (Event Hub, Message Bus topics or queues, Azure Storage) which might be more suited for consumption by apps than the built-in Event Hub compatible endpoint based on your scenario and needs. Read more about his here: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-d2c
You can also leverage the integration with Events Grid which offers an events model (rather than messages model): https://docs.microsoft.com/azure/iot-hub/iot-hub-event-grid-routing-comparison
At the end of the day there is no good or bad way of consuming data coming from devices through IoT Hub.
Note that the Service SDKs for IoT Hub are designed to manage the instance of IoT Hub and manage the attached devices (provisioning, Twins, Direct Methods), but do not support telemetry (D2C) consumption because of exactly this (there is not a single way to consume messages/events from devices).
What I would suggest is to consider how you want to read telemetry based on the type of data you want and how and where it will be consumed. IoT Hub allows to route telemetry data to different types of endpoints (Event Hub, Message Bus topics or queues, Azure Storage) which might be more suited for consumption by apps than the built-in Event Hub compatible endpoint based on your scenario and needs. Read more about his here: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-d2c
You can also leverage the integration with Events Grid which offers an events model (rather than messages model): https://docs.microsoft.com/azure/iot-hub/iot-hub-event-grid-routing-comparison
At the end of the day there is no good or bad way of consuming data coming from devices through IoT Hub.
Note that the Service SDKs for IoT Hub are designed to manage the instance of IoT Hub and manage the attached devices (provisioning, Twins, Direct Methods), but do not support telemetry (D2C) consumption because of exactly this (there is not a single way to consume messages/events from devices).
- saramonteiroJan 11, 2022Copper ContributorThanks Olivier!