QT MQTT 3.1 vs 5.0
-
Hello. I would like to understand about QT MQTT module support for mqtt 5.0.
I have managed to sucesfully build simpleclient example:
https://doc.qt.io/qt-6/qtmqtt-simpleclient-example.htmland I do not fully understand whether it is MQTT 3.1 or MQTT 5.0.
From what I understand, the MQTT 5.0 is not backwards compatible with MQTT 3.1 hence if my server is running MQTT 5.0 and QT uses MQTT 3.1, I wont be able to communicate with it, is that correct?
-
I have noticed that too which is a little bit confusing.
Since 5.0 is not backwards compatible, I cant really find a way on how to configure which MQTT version I want to use in QT. I would expect that I would need to manually choose whether I want to use 3.1 vs 5.0
You have the QtMqttClient protocolVersion property for that if required.
-
Hello. I would like to understand about QT MQTT module support for mqtt 5.0.
I have managed to sucesfully build simpleclient example:
https://doc.qt.io/qt-6/qtmqtt-simpleclient-example.htmland I do not fully understand whether it is MQTT 3.1 or MQTT 5.0.
From what I understand, the MQTT 5.0 is not backwards compatible with MQTT 3.1 hence if my server is running MQTT 5.0 and QT uses MQTT 3.1, I wont be able to communicate with it, is that correct?
Hi,
Based on the index page, both are supported.
-
Hi,
Based on the index page, both are supported.
I have noticed that too which is a little bit confusing.
Since 5.0 is not backwards compatible, I cant really find a way on how to configure which MQTT version I want to use in QT. I would expect that I would need to manually choose whether I want to use 3.1 vs 5.0
-
I have noticed that too which is a little bit confusing.
Since 5.0 is not backwards compatible, I cant really find a way on how to configure which MQTT version I want to use in QT. I would expect that I would need to manually choose whether I want to use 3.1 vs 5.0
You have the QtMqttClient protocolVersion property for that if required.
-
You have the QtMqttClient protocolVersion property for that if required.
@SGaist
You are right.. I missed that completely.m_client = new QMqttClient(this); m_client->setHostname(ui->lineEditHost->text()); m_client->setPort(ui->spinBoxPort->value()); m_client->setProtocolVersion(QMqttClient::MQTT_5_0);
Thank you very much for quick help
-