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.
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