MQTT targets device data collection. It is mainly used for telemetry, or remote monitoring purposes. MQTT collects data from many devices and transports that data to backend IoT services using publish and subscribe technique.
Message Queuing Telemetry Transport Protocol (MQTT)
Getting started
Currently, IoT Hub offers two ways of implementing the MQTT protocol. The first option is to use the IoT Hub device SDK itself. This is suitable if you can easily write the code on the device side.
Secondly, you might face challenges in using IoT device SDK and writing the code on the device; especially if you have old devices in the fields. The solution is to use the MQTT protocol directly.
Let's try the option with IoT Hub device...