Hi Team,
1. nRF9160 supports MQTT version 5.0?
2. Is it recommended to use 5.0? or 3.1.1 is enough?
Regards,
Sravan Rikka
Hi Team,
1. nRF9160 supports MQTT version 5.0?
2. Is it recommended to use 5.0? or 3.1.1 is enough?
Regards,
Sravan Rikka
Thanks for the question Sravan,
The nRF9160 uses the Zephyr MQTT client, which supports MQTT protocol versions 3.1.0, 3.1.1, and 5.0 via the mqtt_version enum (values MQTT_VERSION_3_1_0, MQTT_VERSION_3_1_1, MQTT_VERSION_5_0).[mqtt_version enum]
However, Nordic notes that while MQTT 5.0 is defined in the Zephyr API, the Zephyr MQTT client used in nRF Connect SDK currently does not support MQTT 5 features in practice (for example, Azure IoT Hub MQTT 5 features are not usable yet).[Azure C2D 4kB]
So in real-world use with nRF9160 and current NCS versions, you should plan on MQTT 3.1 or 3.1.1.
Regards,
Don
Hi Don,
We are using SDK 3.1.0.
We have requirement to support Azure IoT Hub communication, so we should not use MQTT version 5.0, am I correct?
Regards,
Sravan Rikka
Hi Don,
We are using SDK 3.1.0.
We have requirement to support Azure IoT Hub communication, so we should not use MQTT version 5.0, am I correct?
Regards,
Sravan Rikka
Hello Sravan,
Nordic Connect SDK 3.1.0 does not have support for MQTT V5.0. It only supported MQTT 3.1.0 and 3.1.1. It appears that Azure IoT hub also has the same limitation.
Zephyr 4.2.0 added support later and NCS 3.2.x does add support for MQTT 5.0. I don't have proof though that it has been tested for the nRF9160.
My recommendation is to stay with MQTT 3.1.1. Also remember that the nRF9160 has a 2KB limit for the secure buffer size used in MQTT transmissions.
Regards,
Don