on error event, additional context: connection return code, error handle from esp_tls (if supported).
connected event, additional context: session_present flag.
subscribed event, additional context: - msg_id message id - error_handle `error_type` in case subscribing failed - data pointer to broker response, check for errors. - data_len length of the data for this event.
unsubscribed event, additional context: msg_id.
published event, additional context: msg_id.
data event, additional context: - msg_id message id - topic pointer to the received topic - topic_len length of the topic - data pointer to the received data - data_len length of the data for this event - current_data_offset offset of the current data for this event - total_data_len total length of the data received - retain retain flag of the message - qos QoS level of the message - dup dup flag of the message Note: Multiple MQTT_EVENT_DATA could be fired for one message, if it is longer than internal buffer. In that case only first event contains topic pointer and length, other contain data only with current data length and current data offset updating.
The event occurs before connecting.
Notification on delete of one message from the internal outbox, if the message couldn't have been sent and acknowledged before expiring defined in OUTBOX_EXPIRED_TIMEOUT_MS. (events are not posted upon deletion of successfully acknowledged messages) - This event id is posted only if MQTT_REPORT_DELETED_MESSAGES==1 - Additional context: msg_id (id of the deleted message).
Custom event used to queue tasks into mqtt event handler All fields from the esp_mqtt_event_t type could be used to pass an additional context data to the handler.