Hello @JazP
Thanks for contacting wolfSSL Support. The `stat` structure element is used internally by the command API. It preserves the current state of the command processing. This functionality is used by the non-blocking configuration option, when the API could return `MQTT_CODE_CONTINUE` to indicate an incomplete command.
If you are reusing the structure for a subsequent call (for example calling publish twice in a row with the same structure), you would need to reset the stat to 0 (MQTT_MSG_BEGIN).
Could you tell us a bit more about your use case? Feel free to contact us at support@wolfssl.com
Thanks,
Eric
Edit to add info about the "ack" - The ack packet is a response from the broker to indicate the status of the requested command.