#message-broker #topic #statistics #client #publish #mqtt #real-time-monitoring #events-system

rmqtt-sys-topic

RMQTT periodically publishes its own operational status, message statistics, and client online/offline events to system topics starting with $SYS/

14 releases (7 breaking)

0.21.0 May 30, 2026
0.19.1 Mar 29, 2026
0.18.1 Dec 8, 2025
0.18.0 Nov 30, 2025
0.1.1 May 22, 2025

#17 in #real-time-monitoring


Used in 2 crates

MIT/Apache

535KB
12K SLoC

English | 简体中文

rmqtt-sys-topic

crates.io

System topics plugin for RMQTT. Publishes broker metrics as $SYS/ MQTT topics for monitoring.

Overview

Periodically publishes broker statistics to the $SYS/ topic tree, which clients can subscribe to for real-time monitoring. This provides visibility into broker health and operational metrics without external monitoring tools.

Available Metrics

The plugin publishes various broker metrics under the $SYS/ hierarchy, including:

  • Client statistics: connected client counts, disconnected sessions
  • Message statistics: published, received, and delivered message counts
  • Broker uptime: time since broker started
  • Version information: RMQTT version and build info

Usage

Add the dependency to Cargo.toml:

rmqtt-sys-topic = "0.22"

Register the plugin in your broker startup code:

rmqtt_sys_topic::register(&scx, true, false).await?;

Configuration

File: rmqtt-sys-topic.toml

Option Type Default Description
publish_qos Integer 1 QoS level for $SYS messages: 0, 1, or 2
publish_interval String "1m" Interval between $SYS metric publications (e.g., "30s", "1m", "5m")
message_expiry_interval String "5m" Message expiry interval for $SYS messages (0 = no expiry)

Default Configuration

publish_qos = 1
publish_interval = "1m"
message_expiry_interval = "5m"

Dependencies

  • rmqtt (feature plugin)

License

MIT OR Apache-2.0

Dependencies

~23–42MB
~592K SLoC