MQTT is a Publish/Subscribe protocol (more info on the MQTT protocol here).
A message is the base unit for data transmission, it mainly contains :
- a topic: the message information type identifier, such as
fr/paris/weather
. Devices that have subscribed to a topic will receive any message published to this topic.
- a payload: the actual data to be transmitted. Can be anything (temperature, image, notification, …) in any format (binary, xml, json, yaml, …)
The Hub will provide an endpoint to connect the devices to and supports the following protocols:
MQTTs
: MQTT over TLS, port 8883
MQTT
: Plaintext MQTT, port 1883
WSs-MQTT
: MQTT over Websocket over TLS, port 443
WS-MQTT
: MQTT over Websocket, port 80
The certificate authority for the TLS endpoints can be downloaded directly from the management console in your IoT Hub overview page. Please note TLS endpoints support both server-only and mutual authentication.