Subscribe the client to defined topic with defined qos Notes: - Client must be connected to send subscribe message - This API is could be executed from a user task or from a *MQTT* event callback i.e. internal *MQTT* task (API is protected by internal mutex, so it might block if a longer data receive operation is in progress. - `esp_mqtt_client_subscribe` could be used to call this function.
Subscribe the client to a list of defined topics with defined qos Notes: - Client must be connected to send subscribe message - This API is could be executed from a user task or from a *MQTT* event callback i.e. internal *MQTT* task (API is protected by internal mutex, so it might block if a longer data receive operation is in progress. - `esp_mqtt_client_subscribe` could be used to call this function.
Client to send a publish message to the broker Notes: - This API might block for several seconds, either due to network timeout (10s) or if publishing payloads longer than internal buffer (due to message fragmentation) - Client doesn't have to be connected for this API to work, enqueueing the messages with qos>1 (returning -1 for all the qos=0 messages if disconnected). If MQTT_SKIP_PUBLISH_IF_DISCONNECTED is enabled, this API will not attempt to publish when the client is not connected and will always return -1. - It is thread safe, please refer to `esp_mqtt_client_subscribe` for details
Starts *MQTT* client with already created client handle
Unsubscribe the client from defined topic Notes: - Client must be connected to send unsubscribe message - It is thread safe, please refer to `esp_mqtt_client_subscribe_single` for details
Processes error reported from transport layer (considering the message read status)
This api is typically used to force disconnection from the broker
Enqueue a message to the outbox, to be sent later. Typically used for messages with qos>0, but could be also used for qos=0 messages if store=true. This API generates and stores the publish message into the internal outbox and the actual sending to the network is performed in the mqtt-task context (in contrast to the esp_mqtt_client_publish() which sends the publish message immediately in the user task's context). Thus, it could be used as a non blocking version of esp_mqtt_client_publish().
Set MQTT5 client publish property configuration This API will not store the publish property, it is one-time configuration. Before call `esp_mqtt_client_publish` to publish data, call this API to set publish property if have
Set MQTT5 client subscribe property configuration This API will not store the subscribe property, it is one-time configuration. Before call `esp_mqtt_client_subscribe` to subscribe topic, call this API to set subscribe property if have
Set configuration structure, typically used when updating the config (i.e. on "before_connect" event Notes: - When calling this function make sure to have all the intendend configurations set, otherwise default values are set.
When using multiple queued item, we'd like to reduce the poll timeout to proceed with event loop exacution
Stops *MQTT* client tasks * Notes: - Cannot be called from the *MQTT* event handler
Destroys the client handle Notes: - Cannot be called from the *MQTT* event handler
Sets *MQTT* connection URI. This API is usually used to overrides the URI configured in esp_mqtt_client_init
Set MQTT5 client connect property configuration
Set MQTT5 client unsubscribe property configuration This API will not store the unsubscribe property, it is one-time configuration. Before call `esp_mqtt_client_unsubscribe` to unsubscribe topic, call this API to set unsubscribe property if have
Set MQTT5 client disconnect property configuration This API will not store the disconnect property, it is one-time configuration. Before call `esp_mqtt_client_disconnect` to disconnect connection, call this API to set disconnect property if have
This api is typically used to force reconnection upon a specific event
Dispatch user event to the mqtt internal event loop