migrated from Bugzilla #424753
status RESOLVED severity normal in component MQTT-JS for ---
Reported in version future on platform PC
Assigned to: Andrew Banks
On 2013-12-30 12:15:34 -0500, Kris K wrote:
Using the developer branch, which I believe, is supposed to handle multiple messages in one websocket frame, messages appear to get mixed up.
I am using mosquitto with the mod_websocket from https://launchpad.net/~roger.light/+archive/ppa
2) run javascript:
var clientid = "clientid_"+ Math.random().toString(36).substring(7);
client = new Messaging.Client("wss://172.22.197.77:443/mqtt", clientid); // your mqtt-websocket broker here
client.onConnectionLost = onConnectionLost;
client.onMessageArrived = onMessageArrived;
client.connect({onSuccess:onConnect});
function onConnect() {
console.log("onConnect");
client.subscribe("/test/#");
};
function onConnectionLost(responseObject) {
if (responseObject.errorCode !== 0)
console.log("onConnectionLost:"+responseObject.errorMessage);
};
function onMessageArrived(message) {
console.log("onMessageArrived: Topic: "+message.destinationName+' msg='+message.payloadString);
}
3) on my system, it comes out like this:
onConnect retained_msg_test.html:18
onMessageArrived: Topic: /test/topic1 msg=blaba1/test/topic2blubu retained_msg_test.html:29
onMessageArrived: Topic: /test/topic2 msg=blubu
migrated from Bugzilla #424753 status RESOLVED severity normal in component MQTT-JS for --- Reported in version future on platform PC Assigned to: Andrew Banks
On 2013-12-30 12:15:34 -0500, Kris K wrote:
On 2014-01-09 09:48:23 -0500, Kris K wrote: