Here https://mosquitto.org/download/ download mqtt windows broker.
After installation in the service
start mqtt service.
If you do not appear in the list of services, you need to
C:\Program Files\mosquitto\mosquitto install
C:\Program Files\mosquitto\mosquitto uninstall
These two commands to install and uninstall mqtt service.
Password Configuration
Create a new file in the mosquitto password.file directory, enter the command
Note that if you need to increase the number of password, you need to remove the -c parameter https://www.cnblogs.com/saryli/p/9820532.html
.\mosquitto_passwd -c G:\MQTT_SERVER\mosquitto sammy
When prompted for a password
Modify mosquitto.conf file
Changed
allow_anonymous false
password_file G:\MQTT_SERVER\mosquitto\password.file
This configuration is complete.
Note: Do not configure the ip address and port information, you can use the network ip address link to mqtt server.