1、安装emqx
- 通过 emqx.io (opens new window)选择 Centos 版本,然后下载要安装的 EMQ X 版本的 zip 包(我们这里选择开源版)。

- 解压并启动EMQX
./bin/emqx start
./bin/emqx_ctl status
2、集群搭建
- 修改各节点 emqx.conf
node.name = emqx@192.168.10.102
- 加入集群
./bin/emqx_ctl cluster join emqx@192.168.10.102
./bin/emqx_ctl cluster status
- 退出/移除 集群
./bin/emqx_ctl cluster leave
./bin/emqx_ctl cluster force-leave emqx@192.168.10.102
3、端口
- 4370:集群节点发现端口
- 8883:SSL监听器
- 8083:Websocket监听器
- 1883:TCP监听器
- 8084:WebSocket with

本文介绍了在Java环境中如何应用MQTT协议,包括安装开源EMQ X broker、集群搭建步骤,详细列出涉及的端口配置,并讲解了如何进行相关安全配置,如关闭匿名用户访问和共享订阅设置。
最低0.47元/天 解锁文章
758

被折叠的 条评论
为什么被折叠?



