服务器之家:专注于VPS、云服务器配置技术及软件下载分享
分类导航

Linux|Centos|Ubuntu|系统进程|Fedora|注册表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服务器之家 - 服务器系统 - windows server - 教你在windows下搭建MQTT服务器的方法

教你在windows下搭建MQTT服务器的方法

2023-02-14 15:51no_hot windows server

这篇文章主要介绍了windows搭建MQTT服务器,首先下载mosquitto在配置,详细配置方法及MQTTX连接服务器的方法,跟随小编一起通过本文学习下吧

一、下载mosquitto

点击下载安装程序 下载地址

教你在windows下搭建MQTT服务器的方法

二、配置mosquitto

1. 安装路径打开命令行界面

教你在windows下搭建MQTT服务器的方法

2. 设置user及password

执行:mosquitto_passwd.exe -c pwfile.example -u vic
设置用户名:vic      设置密码:123456

教你在windows下搭建MQTT服务器的方法

3. 配置文件检查

mosquitto.exe -c mosquitto.conf 
    未报错说明配置正常

4. 设置端口

默认端口:1883
    启动:mosquitto.exe
    指定端口启动:mosquitto.exe -p 10086

5. 订阅者

mosquitto_sub.exe -h 127.0.0.1 -p 10086 -t topicTest01 -u vic -P 123456

6. 发布者

mosquitto_pub.exe -h 127.0.0.1 -p 10086 -u admin -P 111 -t topicTest01 -m "hello world"

7. 命令行测试

教你在windows下搭建MQTT服务器的方法

三、MQTTX

1. 连接服务器

教你在windows下搭建MQTT服务器的方法

2. 订阅topic

教你在windows下搭建MQTT服务器的方法

3. 发布消息

教你在windows下搭建MQTT服务器的方法

到此这篇关于windows搭建MQTT服务器的文章就介绍到这了,更多相关MQTT服务器搭建内容请搜索服务器之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持服务器之家!

原文链接:https://blog.csdn.net/no_hot/article/details/122540087

延伸 · 阅读

精彩推荐