I am going thru the code and found it useful.
https://evothings.com/evothings-does-mqtt-with-bluemix/
Q : How do I disconnect from the Bluemix broker ?
I see a app.onConnect(),
app.initialize()
app.onReady (), and so on..
but I did not see a disconnect().
How to Disconnect ? from bluemix MQTT in tutorial ?
-
- Posts: 12
- Joined: 09:35, 14 Feb 2016
Re: How to Disconnect ? from bluemix MQTT in tutorial ?
The Paho client has disconnect() so you can easily expose that function in our "app":
Reference docs for the Paho js library is here:
http://www.eclipse.org/paho/files/jsdoc ... lient.html
regards, Göran
Code: Select all
app.disconnect = function() {
app.client.disconnect();
console.log("Disconnected ");
}
Reference docs for the Paho js library is here:
http://www.eclipse.org/paho/files/jsdoc ... lient.html
regards, Göran
-
- Posts: 12
- Joined: 09:35, 14 Feb 2016
Re: How to Disconnect ? from bluemix MQTT in tutorial ?
Thanks Goran,
Your suggestion and the link really helped.
Shashi
Your suggestion and the link really helped.
Shashi
-
- Posts: 12
- Joined: 09:35, 14 Feb 2016
Re: How to Disconnect ? from bluemix MQTT in tutorial ?
Please close this issue.
-
- Posts: 12
- Joined: 09:35, 14 Feb 2016
Re: How to Disconnect ? from bluemix MQTT in tutorial ?
I used your code to control DC motors and LEDs from the app using Evothings Workbench and connected to IBM BLuemix .
[img][img][img][/img][/img][/img]
[img][img][img][/img][/img][/img]
- Attachments
-
- duplicate.jpg (119.28 KiB) Viewed 33095 times
Return to “Questions and answers”
Who is online
Users browsing this forum: No registered users and 61 guests