-
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
Connect after constructing client #1557
Comments
I'd also find it useful to have a simple way of constructing the client object. Use case: add events listeners to f.e. |
I was looking exactly for this, because in the python package you create the client, then declare the callbacks, then use a .connect() method.
And the "on connect" callback is declared after the connection, which bothers me a lot. This could cause #1153 for example. I posted a question on stackoverflow : https://stackoverflow.com/questions/75548005/nodejs-mqtt-connection-and-callback-order-is-wrong/76229305?noredirect=1#comment134428767_76229305 but I got no satisfactory answers. |
MQTT 5.0.0 BETA is now available! Try it out and give us feedback: Now you can do this by using the |
Is there a way to first construct the client object with certain options and later connect to the broker?
In some use cases it would be more convenient.
The text was updated successfully, but these errors were encountered: