Skip to content

Releases: smartboot/smart-mqtt

🚀 smart-mqtt v1.5.5 正式发布

10 Apr 02:29

Choose a tag to compare

✨ New Features

Flapping Connection Detection Mechanism

  • Proactive Connection Storm Defense: Real-time detection and automatic banning of "flapping clients" that repeatedly connect/disconnect
  • Sliding Time Window Algorithm: Connection event statistics with millisecond precision
  • Configurable Threshold Policy: Custom detection window, trigger threshold, and ban duration
  • High-performance Concurrent Design: Lock-free concurrency based on ConcurrentHashMap + ConcurrentLinkedDeque
  • Lazy Expiration Cleanup: Automatic ban expiration with periodic background cleanup

Configuration Example:

flapping:
  enable: true
  thresholdDuration: 60      # Detection window in seconds
  thresholdCount: 10         # Connection count threshold
  banTime: 300               # Ban duration in seconds

💡 Typical Scenarios: Edge devices with unstable networks, client application bugs, authentication error loops, DDoS attack prevention.

🎯 Benefits

Dimension Without Flapping Detection With Flapping Detection
CPU Usage Abnormal clients consume all cores Abnormal connections blocked at entry point
Memory Usage Frequent object creation, high GC pressure Only statistics maintained, memory under control
Log Volume Hundreds of connection logs per second 99% reduction in log output
Ops Cost Manual investigation required Fully automatic, zero intervention

📦 Download Links

🐳 Docker Deployment

docker run --name smart-mqtt \
  -p 1883:1883 \
  -p 18083:18083 \
  -d smartboot/smart-mqtt:latest

🔮 What's Next

  • Multi-dimensional identification (IP + ClientId + Username)
  • Tiered banning strategy based on violation frequency
  • Admin dashboard for flapping client statistics and visualization
  • IP-level connection protection
  • Trusted client whitelist support
  • WebHook notification when flapping clients detected

Full Changelog: v1.5.4...v1.5.5


⭐ If you find smart-mqtt useful, please give us a star on GitHub!
💬 Feel free to open issues for any questions or suggestions!

🚀 smart-mqtt v1.5.4 正式发布

31 Mar 02:12

Choose a tag to compare

smart-mqtt v1.5.4 is now available.

This release introduces the new advanced-auth-plugin, bringing more practical and enterprise-ready authentication capabilities to smart-mqtt. Instead of focusing on basic username/password verification only, v1.5.4 improves authentication flexibility, integration readiness, and service stability during large-scale reconnect scenarios.

Highlights

  • Added the new advanced-auth-plugin
  • Supports authentication chains with Redis and HTTP authenticators
  • Easier integration with existing user centers, device platforms, and business systems
  • Better stability when many devices reconnect within a short period of time
  • Supports a progressive authentication strategy such as Redis first, HTTP fallback

Recommended For

  • Integrating MQTT authentication with existing account or permission systems
  • Balancing authentication performance with business integration flexibility
  • Keeping broker access more stable during large-scale device reconnects

Example Configuration

stopOnError: false
allowAnonymous: false

chain:
  - redis
  - http

redis:
  address: redis://localhost:6379
  database: 0

http:
  url: http://localhost:8080/api/auth
  timeout: 5000

Notes

  • smart-mqtt continues to optimize for 100k+ device access scenarios
  • In previous public benchmarks, QoS0 throughput reached 10 million messages/sec
  • The new advanced-auth-plugin further strengthens enterprise authentication on top of smart-mqtt's high-performance foundation

Documentation

🚀 smart-mqtt v1.5.3 正式发布

17 Mar 07:30

Choose a tag to compare

  1. 优化Broker推送模型,感知链接的并发压力进行自动延迟推送。
  2. 优化通信插件的注册机制,实现伴随插件的生命周期进行柔性注销。
  3. 采用SSE实现插件运行日志输出到后台页面呈现。
  4. AI Agent集成 WebPageReaderTool 工具,用于抓取smart-mqtt官网教程

🚀 smart-mqtt v1.5.2 正式发布

04 Mar 04:52

Choose a tag to compare

继 v1.5.1 版本引入 Schema 配置规范和后台 UI 升级后,我们很高兴地宣布 smart-mqtt v1.5.2 正式发布!

本次版本聚焦于智能化能力集成与开发者体验提升,带来两项重要更新:

  • AI Agent 智能助手:集成 Feat AI Agent 能力,为 smart-mqtt 注入智能化交互体验
  • 压测模块插件化:将原 smart-mqtt-bench 独立模块重构为 bench-plugin 插件,开箱即用

🤖 AI Agent 智能助手

本次版本基于 Feat Agent 框架,为 smart-mqtt 企业版集成了智能助手能力。

  • 文档即数据源:持续打磨官方文档,构建结构化、语义清晰的知识体系
  • llms.txt 规范:遵循 llms.txt 标准,为大模型提供优化的内容格式
  • 精准输出:基于优质文档训练的 Agent,能够为用户提供专业、可靠的技术答疑

启用方式:在后台参数设置中配置模型服务 URL、apiKey 和 model 即可。对于数据安全敏感的企业,可对接企业内部私有化模型服务。


🔧 压测模块插件化改造

本次更新将原有的独立压测模块 smart-mqtt-bench 重构为标准的 bench-plugin 插件:

特性 改造前 改造后
部署方式 独立进程运行 插件化集成
配置方式 JVM 系统属性 YAML 配置文件
启动方式 命令行手动启动 随 Broker 自动启动
场景切换 修改代码/重启 修改配置即可

插件化优势:

  • 零侵入集成:作为插件随 Broker 启动,无需额外部署
  • 配置化管理:通过 plugin.yaml 配置文件管理压测参数
  • 场景灵活切换:修改 scenario 参数即可切换压测场景
  • 标准化扩展:遵循 smart-mqtt 插件规范,便于功能扩展

⏰ 插件定时器能力增强

本次版本对 Plugin 基类进行了重要增强,为插件开发者提供更完善的基础能力支持:

timer() - 插件专用定时器

@Override
protected void initPlugin(BrokerContext brokerContext) {
    timer().scheduleWithFixedDelay(() -> {
        doPeriodicTask();
    }, 5, TimeUnit.SECONDS);
}
  • 每个插件拥有独立的定时器实例,任务隔离互不干扰
  • 使用 HashedWheelTimer 实现,高效处理大量定时任务
  • 插件卸载时自动关闭定时器,避免资源泄漏
  • 守护线程模式,不阻塞 JVM 退出

selfRescueTimer() - 自救定时器

适用场景:

  • 插件健康检查与自动恢复
  • 连接断开后的重连机制
  • 资源泄漏检测与清理
  • 关键任务的容错保护

📦 下载地址

🐳 Docker 部署

docker run --name smart-mqtt \
  -p 1883:1883 \
  -p 8083:8083 \
  -d smartboot/smart-mqtt:1.5.2

🚀 快速启动

# 1. 下载发行包
wget https://github.com/smartboot/smart-mqtt/releases/download/v1.5.2/smart-mqtt-1.5.2.jar

# 2. 创建启动脚本 start.sh
cat > start.sh << 'EOF'
#!/bin/bash
dir=$(dirname "$0")
export SMART_MQTT_PLUGINS=${dir}/plugins
export BROKER_PORT=1883
export BROKER_HOST="0.0.0.0"
export BROKER_MAXPACKETSIZE=8192
java -jar smart-mqtt-1.5.2.jar
EOF

# 3. 授权并运行
chmod +x start.sh
./start.sh

🔄 升级指南

  1. 替换 JAR 包:下载 v1.5.2 发行包替换原有版本
  2. 配置兼容:原有配置完全兼容,无需修改
  3. 插件更新:如需使用新插件,下载后放入 plugins 目录

🔮 未来展望

  • Agent 能力增强:集成更多 MCP 工具,扩展 Agent 能力边界
  • 智能运维:基于 AI 实现异常检测、智能诊断、自动调优
  • 压测场景扩展:支持更多压测场景和性能指标采集
  • 开发者工具:提供更完善的开发调试工具链

smart-mqtt v1.5.2:智能化、插件化、更易用
为物联网应用打造新一代云原生消息中间件解决方案

🚀 smart-mqtt v1.5.1 正式发布

08 Feb 06:58

Choose a tag to compare

🎯 核心变化

🔄 统一版本战略

  • 取消社区版与企业版区分,采用单一版本维护
  • 内置官方所有插件,开箱即用
  • 授权决定功能,同一软件满足不同需求

🚀 主要功能改进

📈 性能优化

  • 异步事件总线:提升三方连接认证模式下的并发处理能力
  • 企业版后台 UI 重构:包体积从 12.6MB 降至 9.89MB,减少 22%

🔧 开发者体验

  • Schema 配置规范:插件接口新增 Schema 支持,实现配置页面自适应渲染
  • 动态表单生成:根据 Schema 自动渲染配置表单,无需编写前端代码

🛍️ 商业化支持

  • 模力方舟上架:提供便捷的购买和管理渠道

📦 获取方式

直接下载

Docker 部署

docker run --name smart-mqtt \
  -p 1883:1883 \
  -p 18083:18083 \
  -d smartboot/smart-mqtt:1.5.1

💡 技术亮点

  • 类型安全配置:支持字符串、数字、布尔值、枚举等多种数据类型
  • 响应式布局:完美适配手机端访问
  • 实时校验反馈:表单输入即时校验,减少配置错误

🎯 用户价值

  1. 部署简化:无需选择版本,一次下载全功能体验
  2. 升级无忧:统一升级路径,避免版本混乱
  3. 功能完整:所有官方插件随版本内置,按需启用

smart-mqtt v1.5.1:更快、更灵活、更易用的云原生消息中间件

🚀 smart-mqtt v1.5.0 正式发布

23 Nov 10:31

Choose a tag to compare

继 v1.4.0 版本成功将开源版发行包体积从 3MB 优化至不足 800KB 后,我们很高兴地宣布 smart-mqtt v1.5.0 正式发布!

本次版本专注于企业版的深度优化,实现了前所未有的软件包瘦身效果,同时增强了系统稳定性和企业级特性。

核心亮点

企业版极致瘦身:29.3MB → 12.6MB

通过深入分析企业版软件包构成,我们识别出 redis 桥接插件是体积膨胀的主要原因。经过专项优化:

  • 体积减少 57%:企业版完整软件包从 29.3MB 大幅缩减至 12.6MB
  • 核心优化:redis 桥接插件从 15.5MB 降至 81KB,减少 99.5%
  • 技术突破:自主研发 Redis 客户端框架 Redisun 替代 redisson 依赖
  • 部署优化:更小的包体积带来更快的下载、部署和启动速度

其他优化详情

  • 解决了在特定场景下通配符订阅不生效的问题
  • feat 升级至 1.3.2:引入新的特性和改进,提升微服务治理能力
  • smart-socket 升级至 1.7.5:底层通信框架更新,增强网络通信稳定性
  • 通过优化类加载极致,提升smart-mqtt-maven-plugin插件的本地启动速度

技术指标对比

指标 v1.4.0 企业版 v1.5.0 企业版 改进幅度
完整软件包体积 29.3MB 12.6MB 57%
redis 桥接插件 15.5MB 81KB 99.5%
配置方式 环境变量/系统属性 环境变量/系统属性 无变化
核心依赖 redisson Redisun 更轻量

🚀 smart-mqtt v1.4.0 正式发布

16 Oct 01:32

Choose a tag to compare

Full Changelog: v1.3.0...v1.4.0

经过深度打磨与架构优化,我们很高兴地宣布 smart-mqtt v1.4.0 正式发布!本次版本在保持高性能优势的基础上,带来了两大核心突破:发行包极致瘦身配置方式全面革新

🔧 核心更新亮点

✅ 发行包极致瘦身

  • 开源版发行包体积从 3MB 降至不足 800KB,减少约 73%
  • 深度优化 Maven 依赖,移除冗余组件
  • 提升下载、部署和启动速度

✅ 配置方式全面革新

  • 废弃传统的 smart-mqtt.yaml 配置方式
  • 全面采用系统属性和环境变量进行配置
  • 完美契合 Docker、Kubernetes 等云原生环境

✅ 性能测试新发现

在将压测环境从 Docker 切换至 Podman 后,我们观察到:

  • QoS0 吞吐量达到 1000W/秒,提升 200W/s
  • QoS1/2 性能在原有基础上提升上百万

✅ 内存优化持续升级

  • 重构 Topic 树存储结构,减少冗余对象创建
  • 优化订阅关系引用管理机制
  • 引入智能缓存复用策略,降低 GC 压力

📦 其他改进

  • 升级 feat 至 1.3.1,引入新的特性和改进
  • 优化日志系统,提升可读性和调试便利性
  • 集群插件稳定性提升,增强重连逻辑
  • 企业级插件增加故障自愈机制

🔌 插件优化进展

集群插件(cluster-plugin)

  • 提升重连逻辑稳定性
  • 优化故障检测和恢复机制

企业级插件(enterprise-plugin)

  • 增加故障自愈机制,提升服务稳定性
  • 优化插件仓库存储结构
  • 迁移插件市场至新服务地址

🌐 获取方式

🐳 快速部署(Docker)

docker run --name smart-mqtt \
  -p 1883:1883 \
  -p 18083:18083 \
  -d smartboot/smart-mqtt:latest

升级提示:v1.4.0 版本配置方式有重大变更,建议先在测试环境验证后再部署到生产环境。