Important: Please read the Qt Code of Conduct -

Messaging choice for both binary&text payload (MQTT & AMQP & ZeroMQ etc)

  • Hi Dear friends,

    I am new to Qt & C++ (as a scala & java girl) and when I am assuming getting understand the framework, there will be always new challenges. :)

    I have a project using multithreading QT Gui application and working quite well. Taking the video stream from camera , analysing the frame extracting the known objects (cats, dogs, foxes etc) . Main idea is detect the stray animals (dogs/cats) and nature animals who needs help for food & care.

    Next step I want to send the information to the remote server ( detected animal image 45kb, meta data 1kb etc) to collect and analyse for further precautions.

    I started to test with AMQP-CPP and posted this forum for help link.

    then try to utilize zeroMQ (which look easy in C++) but cant coordinate like AMQP-CPP . They are waiting for some kind of event loop trigger which I didnt understand quite well.

    Now testing the qtmqt (official one) which is looking promising. (signal and slot ). But I dont know is mqtt is good choice for 50kb message . (Daily 20K messages)

    Kindly I am asking a working example to direct me to my path again; which is messaging protocol class (amqp or zeromq ) living another thread, and my main thread using signal slot to communicate with that ?

    Any help appriciated. both example and also advise for choosing right messaging protocol/solution.

    thanks A Lot

  • Lifetime Qt Champion


    Something's not clear. Who or rather what else would be connected to your message queue to receive your messages ?

  • there is 10+ remote clients and produce data to send the main server. we will use c++ and Qt.

  • Lifetime Qt Champion

    From a quick look to this page it seems that MQTT does support what you want.

  • Lifetime Qt Champion

    We use mqtt for machine control. Sending 50kb should not be an issue since it should just be reported and its not critical its real time.
    However, since all Topics are strings, you will need to encode the image to send it.

    However, im wondering since mqtt is via broker and uses Publication/Subscription method if its
    optimal if the only thing the you need is just to send image+meta data and then disconnect.

    However, if you also plan on having the Nodes report they are online and other statuses, you
    should like mqtt.

Log in to reply