Skip to content

🚀 smart-mqtt v1.5.5 正式发布

Latest

Choose a tag to compare

@smthing smthing released this 10 Apr 02:29
· 19 commits to master since this release

✨ 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!