Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT MQTT 3.1 vs 5.0

QT MQTT 3.1 vs 5.0

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 463 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lukutis222
    wrote on last edited by
    #1

    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.html

    and 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?

    SGaistS 1 Reply Last reply
    0
    • L lukutis222

      @SGaist

      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

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      You have the QtMqttClient protocolVersion property for that if required.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply
      1
      • L lukutis222

        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.html

        and 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?

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Based on the index page, both are supported.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        L 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Based on the index page, both are supported.

          L Offline
          L Offline
          lukutis222
          wrote on last edited by
          #3

          @SGaist

          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

          SGaistS 1 Reply Last reply
          0
          • L lukutis222

            @SGaist

            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

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            You have the QtMqttClient protocolVersion property for that if required.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            L 1 Reply Last reply
            1
            • SGaistS SGaist

              You have the QtMqttClient protocolVersion property for that if required.

              L Offline
              L Offline
              lukutis222
              wrote on last edited by
              #5

              @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

              1 Reply Last reply
              0
              • L lukutis222 has marked this topic as solved on

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved