Closed trombik closed 5 years ago
https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/protocols/mqtt.html#_CPPv423esp_mqtt_client_publish24esp_mqtt_client_handle_tPKcPKciii states that:
return message_id of the subscribe message on success 0 if cannot publish
this, grammatically, does not make sense and the subscribe message should have meant the published message.
the subscribe message
the published message
when QoS is zero, the return value is always zero because mqtt_msg_publish() sets message_id to zero.
mqtt_msg_publish()
message_id
https://github.com/espressif/esp-mqtt/blob/18b6f2c58231728805ff813d46021d07ed023dcb/lib/mqtt_msg.c#L433
Thanks for raising this issue, will be fixed.
https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/protocols/mqtt.html#_CPPv423esp_mqtt_client_publish24esp_mqtt_client_handle_tPKcPKciii states that:
this, grammatically, does not make sense and
the subscribe message
should have meantthe published message
.when QoS is zero, the return value is always zero because
mqtt_msg_publish()
setsmessage_id
to zero.https://github.com/espressif/esp-mqtt/blob/18b6f2c58231728805ff813d46021d07ed023dcb/lib/mqtt_msg.c#L433