Cancels an outgoing publish callback (only for QoS > QoS0) by removing it from the pending ACK list.
uint16_t packetId );
MQTTStatus_t MQTT_CancelCallback(const MQTTContext_t *pContext, uint16_t packetId)
Cancels an outgoing publish callback (only for QoS > QoS0) by removing it from the pending ACK list.
Definition: core_mqtt.c:2546
MQTTStatus_t
Return codes from MQTT functions.
Definition: core_mqtt_serializer.h:97
A struct representing an MQTT connection.
Definition: core_mqtt.h:160
- Note
- This cannot cancel the actual publish as that might have already been sent to the broker. This only removes the details of the given packet ID from the list of unACKed packet. That allows the caller to free any memory associated with the publish payload, topic string etc. Also, after this API call, the user provided callback will not be invoked when the ACK packet is received.
- Parameters
-
[in] | pContext | Initialized MQTT context. |
[in] | packetId | packet ID corresponding to the outstanding publish. |
- Returns
- MQTTBadParameter if invalid parameters are passed; MQTTSuccess otherwise.