mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-08-03 20:14:15 +02:00
0a1d9d0300
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>