感谢大家帮忙给新项目点Star,感谢!
SMQTT基于reactor-netty(spring-webflux底层依赖) 开发,底层采用Reactor3反应堆模型,支持单机部署,支持容器化部署,具备低延迟,高吞吐量,支持百万TCP连接,同时支持多种协议交互,是一款非常优秀的消息中间件!
消息质量等级实现(支持qos0,qos1,qos2)
topicFilter支持
会话消息
保留消息
遗嘱消息
设备掉线时候触发
客户端认证
tls加密
websocket协议支持x
使用mqtt over websocket
http协议交互
SPI接口扩展支持
集群支持(gossip协议实现)
容器化支持
默认镜像最新tag: 1ssqq1lxr/smqtt
持久化支持(session 保留消息)
规则引擎支持
支持springboot starter启动
管理后台
请参考smqtt文档如何启动管理后台
grafana监控集成
ACL权限管理
认证模块
大家不要恶意链接,谢谢!
管理 | 说明 | 其他 |
---|---|---|
121.40.92.152:1883 | mqtt端口 | 用户名:smqtt 密码:smqtt |
121.40.92.152:18888 | mqtt over websocket | 用户名:smqtt 密码:smqtt |
http://121.40.92.152:60000/smqtt/admin | 管理后台 | 用户名:smqtt 密码:smqtt |
引入依赖
<!--smqtt依赖 -->
<dependency>
<groupId>io.github.quickmsg</groupId>
<artifactId>smqtt-core</artifactId>
<version>${Latest version}</version>
</dependency>
<!--集群依赖 -->
<dependency>
<artifactId>smqtt-registry-scube</artifactId>
<groupId>io.github.quickmsg</groupId>
<version>${Latest version}</version>
</dependency>
<!--管理ui依赖 -->
<dependency>
<artifactId>smqtt-ui</artifactId>
<groupId>io.github.quickmsg</groupId>
<version>${Latest version}</version>
</dependency>
Bootstrap.builder()
.rootLevel(Level.INFO)
.websocketConfig(
BootstrapConfig.WebsocketConfig
.builder()
.enable(false)
.path("/mqtt")
.port(8888)
.build()
)
.tcpConfig(
BootstrapConfig
.TcpConfig
.builder()
.port(1883)
.ssl(SslContext.builder().enable(false).build())
.build())
.httpConfig(
BootstrapConfig
.HttpConfig
.builder()
.enable(false)
.accessLog(true)
.admin(BootstrapConfig.HttpAdmin.builder().enable(true).username("smqtt").password("smqtt").build())
.build())
.clusterConfig(
BootstrapConfig.
ClusterConfig
.builder()
.enable(false)
.namespace("smqtt")
.node("node-1")
.port(7773)
.url("127.0.0.1:7771,127.0.0.1:7772").
build())
.build()
.startAwait();
Bootstrap bootstrap = Bootstrap.builder()
.rootLevel(Level.INFO)
.websocketConfig(
BootstrapConfig.WebsocketConfig
.builder()
.enable(false)
.path("/mqtt")
.port(8888)
.build()
)
.tcpConfig(
BootstrapConfig
.TcpConfig
.builder()
.port(1883)
.ssl(SslContext.builder().enable(false).build())
.build())
.httpConfig(
BootstrapConfig
.HttpConfig
.builder()
.enable(false)
.accessLog(true)
.admin(BootstrapConfig.HttpAdmin.builder().enable(true).username("smqtt").password("smqtt").build())
.build())
.clusterConfig(
BootstrapConfig.
ClusterConfig
.builder()
.enable(false)
.namespace("smqtt")
.node("node-1")
.port(7773)
.url("127.0.0.1:7771,127.0.0.1:7772").
build())
.build()
.start().block();
在smqtt-bootstrap/target目录下生成jar
准备配置文件 config.yaml
启动服务
java -jar smqtt-bootstrap-1.0.1-SNAPSHOT.jar <config.yaml路径>
拉取镜像
# 拉取docker镜像地址
docker pull 1ssqq1lxr/smqtt:latest
启动镜像默认配置
# 启动服务
docker run -it -p 1883:1883 1ssqq1lxr/smqtt
启动镜像使用自定义配置(同上准备配置文件config.yaml)
# 启动服务
docker run -it -v <配置文件路径目录>:/conf -p 1883:1883 -p 1999:1999 1ssqq1lxr/smqtt
引入依赖
<dependency>
<groupId>io.github.quickmsg</groupId>
<artifactId>smqtt-spring-boot-starter</artifactId>
<version>${Latest version >= 1.0.8}</version>
</dependency>
启动类Application上添加注解 @EnableMqttServer
配置application.yml文件
properties也支持,但是需要自己转换,没有提供demo文件
启动springboot服务服务即可
如果引入的是spring-boot-starter-parent的管理包,如果启动报错,则需要添加以下依赖
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.4.9</version>
</dependency>
<dependency>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty</artifactId>
<version>1.0.10</version>
</dependency>
一款非常好用的IOT平台 thinglinks:
Lemon877164954
,拉入smqtt官方交流群700152283
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
代码活跃度
社区活跃度
团队健康
流行趋势
影响力
:与代码提交频次相关
:与项目和用户的issue、pr互动相关
:与团队成员人数和稳定度相关
:与项目近期受关注度相关
:与项目的star、下载量等社交指标相关