-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support URI connections #164
Comments
I would like to get some feedback from @knolleary and @ralight on the URL The main thing we are missing is a new 'createClient' interface that can |
Yeah I would encourage you to consider moving to something like. var mqtt = require('mqtt')
// either mqtt:// or tcp://
client = mqtt.connect('mqtt://guest:guest@localhost'); With an var mqtt = require('mqtt')
var options = {
rejectUnauthorized : true,
};
// either mqtts:// or ssl://
client = mqtt.connect('mqtts://guest:guest@localhost', options); This would avoid breaking the existing code while offering a nice clean interface for connecting using a URI. |
@mcollina this was discussed recently on the MQTT mailing list. A summary of the discussion was put on the wiki here. The piece that is missing is how to specify the client-id in the uri. The only place for it is as a Admittedly this is all informal - I will bring it up on the OASIS list for discussion to see if we can get something added in time for the 3.1.1 doc. |
Have raised an issue against 3.1.1 - https://tools.oasis-open.org/issues/browse/MQTT-203 |
@knolleary do you think the clean flag should be in the URI, in the same way client id is specified? |
Added connect method which accepts a URI see #164.
The client does not seem to support URI connections, while there is no common MQTT URI scheme, supporting
mqtt://
,mqtts://
andtcp://
URI's would make it easier touse this client in heroku and other PaaS environments.
Any thoughts on this?
See njh/ruby-mqtt#31 for previous discussions on this.
The text was updated successfully, but these errors were encountered: