Multiple logins.
Closed this issue · 3 comments
Hello, i need advice here please, if my project has multiple user registration and login's, and want to enable the all to login to the mqtt broker using their own username and password, what would be the correct way doing that? i had a look at the code, and noticed the mqtt.php in config dir, should i move the __construct() contents into the ConnectAndPublish method, so i can pass the connection details as parameters? Thank you.
Yup you can add those params in ConnectAndPublish and also can accept these params in the construct.
You can do it either way.
Thank you, i been testing the test repo, the sub route will keep loading and if i publish to the same topic using terminal tool, nothing echos, is this normal behavior? am using php.7.2 and msquitto broker.
Yes it is a normal behavior.Since subscription requires a long running process and for which php is not good at use phpfpm + nginx for that or increase set max_execution_time in your php.ini file.
Thanks