espressif / esp-mqtt

ESP32 mqtt component
Apache License 2.0
603 stars 255 forks source link

Till this library gets production ready; which other esp32 MQTT library would you recommend? (IDFGH-1029) #115

Closed imranaalam closed 4 years ago

imranaalam commented 5 years ago

i am making a prototype and i have to come to market fast without errors or bugs. which other libraryu with QOS 0,1 and 2 is suitable for esp32 MQTT?

david-cermak commented 5 years ago

This probably depends on your application, if you indent to use a specific cloud solution (amazon, microsoft..), it's recommended to use related IoT SDKs, such as:

In case one wants a general mqtt client I would recommend this library as it's a very simple yet quite generic and complete implementation, under active maintenance and continuous testing (+ testing with esp-idf). Of course there are issues and bugs, at this moment two outstanding issues, which will be addressed soon. If you have any concern or know about a missing feature please file an issue.

If you're looking for an alternative, maybe open a topic in the esp32 forum. There are other mqtt libraries used with ESP32, I personally cannot but recommend this one, I am biased though :smile:

milamber-ls commented 5 years ago

i am making a prototype and i have to come to market fast without errors or bugs. which other libraryu with QOS 0,1 and 2 is suitable for esp32 MQTT?

so do we :) this library has given me grief for the time being. I am looking for alternatives and I will share my findings here

hg5134021 commented 5 years ago

Hi , Learning ESP n entry level , May i know, Is this library also applicable to ESP8266 ? Noticed this is mentioned as ESP32. Just want to double confirm and make my self clear on this. Thanks in advance.

david-cermak commented 4 years ago

@imranaalam Any updates? I would say the stability of the esp-mqtt has improved.

milamber-ls commented 4 years ago

take a look at wolfmqtt https://www.wolfssl.com/products/wolfmqtt/

david-cermak commented 4 years ago

@imranaalam Thanks for the feedback! Yes, wolfSSL is a good alternative and is already included in esp-idf as an option for TLS stack. The downside is the license, which for some users might not be acceptable.

e4tech commented 4 years ago

What is the size of the ESP-MQTT (this) library, I would like to know as the wolfSSL one is 3.6kB.

Btw, hoping that this (current) one keeps getting better (as has been the case recently. Thanks @david-cermak !)

david-cermak commented 4 years ago
> idf.py size-components
            Archive File DRAM .data & .bss   IRAM Flash code & rodata   Total
...
               libmqtt.a          4      0      0      11224     3426   14654

As for the wolfmqtt, you can get similar numbers when building for ESP32, this is what I get when included directly into the main component:

               libmain.a          0   1042      0      10216     4043   15301

Noting that the original main was about 3433 total, so indeed the footprint of wolfmqtt is smaller on ESP platform.

david-cermak commented 4 years ago

Closing this now as this was merely a question in the first place. Moreover I believe this library has been largely updated since and has improved significantly in its stability and robustness.