LiamBindle / MQTT-C

A portable MQTT C client for embedded systems and PCs alike.
https://liambindle.ca/MQTT-C
MIT License
766 stars 269 forks source link

mqtt_publish seems to only send QoS 0 #154

Closed pspeirs closed 2 years ago

pspeirs commented 2 years ago

Hi, I've used the following line to call mqtt_publish with the QOS 1 flag and I appear to only be sending QoS 0 out to the broker.

//mqtt_publish(&client, mqtt_topic_name, mqtt_msg_buffer, strlen(mqtt_msg_buffer), MQTT_PUBLISH_QOS_0);
mqtt_publish(&client, mqtt_topic_name, mqtt_msg_buffer, strlen(mqtt_msg_buffer), MQTT_PUBLISH_QOS_1);

Seems pretty simple, so any help would be awesome.

pspeirs commented 2 years ago

Apologies, I should read the protocol documentation fully.