eclipse / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.08k stars 879 forks source link

MqttClient waits after sending a qos=0 message #1014

Open InvincibleSuper opened 10 months ago

InvincibleSuper commented 10 months ago

The method Token.waitForCompletion() will only handle the type of message that has a response, and will not work on the type publish message because it has no response

I looked through the code again and found that the qos=0 message was to be sent using MqttTopic. Whether this is ambiguous to the consumer, it is recommended to adapt MqttClient.publish() to the qos=0 message