I'm trying to publish a MQTT message via javascript using the Paho MQTT js client:
gClient = new Paho.Client("192.168.178.34", 9001, "clientId");
gClient.send("mytopic", "myvalue", 1, true);
As I can see in another MQTT client, the message is actually sent. But strangely the QOS is 0 (not 1) and the message is NOT retained.
According to the documentation https://www.eclipse.org/paho/files/jsdoc/Paho.MQTT.Client.html it should work. Why doesn't it?