Enable user to set which interface should be used for client network,
allowing client to be binded to the interface selected by user forcing
it to go through the selected interface.
Closes https://github.com/espressif/esp-mqtt/issues/253
The possibility to add a callback as custom handler was removed from
the client in favor of esp_event. These removes the older alternative
that wasn't possible to use.
Today there is no way to add a new transport without applying
modifications to the transport list. This impose limitations on the
client usage. Adding the custom configuration we enable user defined
transports.
Fix: Compilation in C++ with multiple subscribe
See merge request espressif/esp-mqtt!171
(cherry picked from commit 88413ec3f27102daa805ae1992dd145b42d4690d)
47da99fb Fix: Compilation in C++ with multiple subscribe
- Payload data parsed for error codes. Check only for first filter
because our subscribe function only handle one topic filter in each
call.
- Closes https://github.com/espressif/esp-mqtt/issues/233
- Transport selection enum was incorrectly pointed as having precedence
over URI.
- Added names to unnamed enums and structs on typedefs.
- Reorganize config struct fields grouping fields with related context.
Added a separate config value to allow disable the keepalive mechanism (and keep the existing API the same)
Internally though, the keepalive value (in connect_info) is in line with 3.1.2.10 Keep Alive from mqtt spec:
* keepalive=0: Keep alive mechanism disabled (server not to disconnect the client on its inactivity)
* period in seconds to send a Control packet if inactive
Closes https://github.com/espressif/esp-mqtt/issues/179
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>
Also renamed error type MQTT_ERROR_TYPE_ESP_TLS to
MQTT_ERROR_TYPE_TCP_TRANSPORT, as the former was confusing and might
have implied the error occurred in TLS layer.
Applicable IDF version >= v4.3
Closes https://github.com/espressif/esp-idf/issues/5906
Digital Signature enables hardware accelerated RSA signature
for TLS handshake.The RSA private key(client key) is also stored in
encrypted format and ecryption key is stored in hardware(efuse) which adds
additional level of security for mutual authentication.
* Digital Signature is only supported for ESP32-S2.
Applicable IDF version >= v4.3
esp_mqtt_client_stop would lead to a deadlock (with itself) when called
from the event handler.
Updated comments to reflect that some functions should not be called from
the event handler.
Closes https://github.com/espressif/esp-mqtt/issues/163