smart-mqtt 1.8.0: Cutting 1,400 Lines to Build a Leaner MQTT Broker
The smart-mqtt 1.8.0 release removes built-in monitoring storage and extracts configuration management, adopting Prometheus-standard metrics and a silent config module to reduce operational weight for containerized deployments.
Return Monitoring to Professionals
Previous versions of smart-mqtt wrote metrics into an embedded database and provided a query UI. The team realized this created two monitoring systems: a professional Prometheus/Grafana stack and an inferior built-in one. Maintaining the latter only because the former wasn't auto-configured was a misstep.
Changes in v1.8.0:
Standardized metrics to Prometheus format — metrics are now exposed via the Prometheus specification; no historical data is stored locally. Monitoring data lives only in the user's monitoring system.
Added latency histogram for PUBLISH handling — instead of a single average (e.g., 0.8 ms), a full quantile distribution is provided. This lets operators spot slowdowns at specific percentiles during incidents.
The best monitoring is the one that doesn't require logging into our backend.
Extract Configuration from Core Code
Configuration management has been moved out of the core into an independent module. The goal is a silent configuration layer — unnoticed until containerization or orchestration reveals everything is already in place.
Why Obsess Over Lightweight?
The article poses a scenario: a broker that must cold-start in a container, run for seven days, then be destroyed. How much baggage should it carry? An embedded database? A plugin system configured once at boot?
Software weight isn't measured in install size, but in how afraid you are to change it.
Lightweight means every remaining component is indispensable. Core dependencies — smart-socket transport kernel and Feat framework — stayed at their current versions; only bloat was removed. The release deletes approximately 1400 lines of code while adding fewer than 600 lines.
Release Notes
Version 1.8.0 is upcoming. Users upgrading from earlier versions should review migration guides, especially for database schema cleanup and monitoring migration. Scripts and ready-made Grafana panels are provided to ease the transition.
The project welcomes suggestions on what to delete next. Repository:
https://gitee.com/smartboot/smart-mqttSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Three Knives
Every line of code you contribute to open source could help make the future better.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
