MQTT use under Windows

Here https://mosquitto.org/download/ download mqtt windows broker.

After installation in the service
Here Insert Picture Description
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.

Published 11 original articles · won praise 1 · views 162

Guess you like

Origin blog.csdn.net/xuancuocui1413/article/details/104078144