Function esp_idf_svc::hal::sys::esp_mqtt_client_subscribe_multiple

source ยท
pub unsafe extern "C" fn esp_mqtt_client_subscribe_multiple(
    client: *mut esp_mqtt_client,
    topic_list: *const topic_t,
    size: i32,
) -> i32
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.