0a1d9d0300335ca98dd1fed8d2ec2411145877b0
Allow application to get current outbox_size. Application may try to send many publish request for a long period and then system can hit OOM when publish QoS>1 with a busy borker. Reduce OUTBOX_EXPIRED_TIMEOUT_MS does not help too much because the publish freauency depends on the data received in different environment. i.e. In some environment, sometimes it's easy to hit OOM before reaching OUTBOX_EXPIRED_TIMEOUT_MS. To avoid such issue, add esp_mqtt_client_get_outbox_size API, so the application can stop publishing to avoid OOM when outbox takes too much memory. Signed-off-by: Axel Lin <axel.lin@ingics.com>
ESP32 MQTT Library
Features
- Based on: https://github.com/tuanpmt/esp_mqtt
- Support MQTT over TCP, SSL with mbedtls, MQTT over Websocket, MQTT over Websocket Secure
- Easy to setup with URI
- Multiple instances (Multiple clients in one application)
- Support subscribing, publishing, authentication, will messages, keep alive pings and all 3 QoS levels (it should be a fully functional client).
How to use
ESP-MQTT is a standard ESP-IDF component. Please refer to instructions in ESP-IDF
Documentation
-
Please refer to the standard ESP-IDF, documentation for the latest version: https://docs.espressif.com/projects/esp-idf/
-
Documentation of ESP-MQTT API: https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/protocols/mqtt.html
License
- MQTT Package - Stephen Robinson - contiki-mqtt
- Others @tuanpmt Apache License
Older IDF verisons
For ESP-IDF versions prior to IDFv3.2, please clone as a component of ESP-IDF:
git submodule add https://github.com/espressif/esp-mqtt.git components/espmqtt
and checkout the ESP-MQTT_FOR_IDF_3.1 tag
Languages
C
96.5%
C++
1.7%
Shell
1.1%
CMake
0.7%