Please nominate your Qt Champions for 2021!

how can I read QDataStream from mqtt with nodeJs

  • I have below data stream :

    struct dataLoad {
            QString text;
            QImage image;
    Sending it to the mqtt broker.

    How can I read it from nodejs client as string and png ?

    var mqtt = require('mqtt')
    //var client  = mqtt.connect('mqtt://', username="murat" , password="murat1990" , clientId="nodeJS")
    var client = mqtt.connect('mqtts://', {
        username: 'admin',
        password: 'xx',
        rejectUnauthorized: false
    client.on('connect', function () {
      client.subscribe('qtmqtt/topic1', function (err) {
        if (!err) {
          client.publish('result/light', 'Hello mqtt')
    client.on('message', function (topic, message) {
      // message is Buffer

  • Lifetime Qt Champion


    Why a nodejs client ?

  • I found its easy to send my client to use.. What will be the your sugeestion ? Python?

  • Lifetime Qt Champion

    If you already use Qt why not continue with it ?

Log in to reply