Send device-to-cloud and cloud-to-device messages with IoT Hub
IoT Hub allows for bi-directional communication with your devices. Use IoT Hub messaging to communicate with your devices by sending messages from your devices to your solutions back end and sending commands from your IoT solutions back end to your devices. Learn more about the IoT Hub message format.
Sending device-to-cloud messages to IoT Hub
IoT Hub has a built-in service endpoint that can be used by back-end services to read telemetry messages from your devices. This endpoint is compatible with Event Hubs and you can use standard IoT Hub SDKs to read from this built-in endpoint.
Sending cloud-to-device messages from IoT Hub
You can send 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.
Choosing the right type of 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 to choose between device-to-cloud messages, reported properties, or file upload.
Refer to Cloud-to-device communication guidance to choose between cloud-to-device messages, desired properties, or direct methods.