paho.mqtt.javascript
paho.mqtt.javascript copied to clipboard
Which version is 'stable' release?
I'm actually confused over what the 'latest' version even is.
There seem to be at least 3 links being used:
On this GIT it says: https://raw.githubusercontent.com/eclipse/paho.mqtt.javascript/master/src/paho-mqtt.js
But also says official download is: https://www.eclipse.org/downloads/download.php?file=/paho/releases/1.0.3/paho.javascript-1.0.3.zip
While on actual eclipse website for Paho it says to use this CDN: https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.js
All three of these are different.
Which is recommended one? Thanks!
I think this project is not maintained anymore
I can confirm what @sectokia has pointed out, that the situation is messy and probably the project is abandoned. I managed to understand that probably version 1.1.0 is the real last release because the docs explain something that do not work with earlier versions (e.g. onConnected event) and other examples are simply not updated to work with 1.1.0 (wrong namespace).
The three big change steps that I identified are:
- Before 1.0.3 the main js file was called
mqttws31.js
(Cloudflare CDN link uses this file from v.1.0.1 and also you can find it around, like HiveMQ uses it in some examples) - From 1.0.3, main js file changes to
paho-mqtt.js
(Updated Readme.md) and is version linked in the official Downloads page of the Project Download - With version 1.1.0 (as stated in the Readme.md) there is breaking difference, a change in the namespace from
Paho.MQTT
to simplyPaho
. So even the "Getting Started" example doesn't work. From the Downloads page if you change the URL to 1.1.0 you can download a .zip of the last release.
I decided to go down this rabbit hole after the event onConnected
described in the docs did not fire and every examples I could find, instead used onSuccess
inside connect()
.
I checked the code on GitHub and the call was correct, so I realized that I was using something different.
Hope this can help.