Let’s see types of messages supported in Azure IOT Hub:
Cloud to Device messaging Direct method
There are use cases for using each of these message types and one or the other isn’t the solution for all problems.
Let’s see few of the differences between how these 2 methods work:
- CDM uses One way messaging where as Direct method uses 2 way connection
- Because of the above reason there is no easy feedback loop, there is a way to leverage feedback endpoint in IOTHub but there is no way to relate feedback with message
- CDM uses Hub to store the message and Hub is responsible of re-trying logic to send the message until expiration (configured at Hub level or can be configured for each device)
- CDM Supports AMQP/ MQTT and HTTPS but Direct Methods don’t support HTTPS