Function esp_idf_sys::esp_mqtt_client_subscribe_multiple

source ยท
pub unsafe extern "C" fn esp_mqtt_client_subscribe_multiple(
    client: esp_mqtt_client_handle_t,
    topic_list: *const esp_mqtt_topic_t,
    size: c_int,
) -> c_int
Expand description

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

@param client MQTT client handle @param topic_list List of topics to subscribe @param size size of topic_list

@return message_id of the subscribe message on success -1 on failure -2 in case of full outbox.