Mosquitto vs eclipse paho client library

坚强是说给别人听的谎言 提交于 2020-06-14 04:06:57

问题


I'm just looking into the details of Eclipse PAHO and Mosquitto client libraries (MQTT C++ libraries). It looks like the PAHO uses the mosquitto MQTT broker but provides its own MQTT client libraries.

Also the Mosquitto library provides a way to implement client libraries for Mosquitto MQTT broker.

I would like to understand what's the main difference between these two client libraries. Here it is discussed but that does not answer my question. Which is preferred over another and why? and why eclipse supports both?


回答1:


I'm facing the same issue, whether to pick paho or Mosquitto c++ client library for an embedded linux device. I tried first a minimal application with PAHO. It basically supports all the features I need, but the cpp-library-wrapper does not and I feel like the main project branch paho.mqtt.cpp is not maintained very well. Since there are two features

  1. encryption

  2. set all connect options like mqtt-version, etc

which are not offered through the mainBranch cpp-lib in PAHO, I'm going to use libmosquitto with libmosquittopp wrapper now. So as you see my decision is related to the cpp-library only. But like you I'm still interested to get to know what are the differences between the underlying C-libraries.




回答2:


We have used Paho C library and Java library. If you look at the Paho C code, the code quality is poor. With the Java library, we experienced a problem where Linux deletes a temp file and Paho does not recover - don't know if that affects the C version. Trying libmosquitto for next project.



来源:https://stackoverflow.com/questions/43039471/mosquitto-vs-eclipse-paho-client-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!