问题
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
encryption
- 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