Device-to-cloud and cloud-to-device messaging with IoT Hub
Use IoT Hub messaging to communicate with your devices by:
- Sending device-to-cloud messages from your devices to your solution back end.
- Sending cloud-to-device messages from the solution back end to your devices.
Some of the features mentioned in this article, like cloud-to-device messaging, device twins, and device management, are only available in the standard tier of IoT hub. For more information about the basic and standard IoT Hub tiers, see How to choose the right IoT Hub tier.
Core properties of IoT Hub messaging functionality are the reliability and durability of messages. These properties enable resilience to intermittent connectivity on the device side, and to load spikes in event processing on the cloud side. IoT Hub implements at least once delivery guarantees for both device-to-cloud and cloud-to-device messaging.
For an introduction to the capabilities of IoT Hub, see the Overview of the Azure IoT Hub service.
When to use IoT Hub messaging
Use device-to-cloud messages for sending time series telemetry and alerts from your device app, and cloud-to-device messages for one-way notifications to your device app.
- Refer to Device-to-cloud communication guidance if in doubt between using device-to-cloud messages, reported properties, or file upload.
- Refer to Cloud-to-device communication guidance if in doubt between using cloud-to-device messages, desired properties, or direct methods.