MQTT-TOPN: display MQTT topic statistics
Overview
This is a simple MQTT subscriber client in Go to display topic performance statistics with TopN most "chatty" topics. The idea is similar to the Unix "top" process statistics utility detailed at https://www.geeksforgeeks.org/top-command-in-linux-with-examples/ .
It is the command-line interface equivalent of https://github.com/gambitcomminc/mqtt-stats implemented with Go ncurses https://godoc.org/github.com/gbin/goncurses
This utility allows you to analyze quantitatively the published topics underneath a wildcard topic and answer such questions as "which topic generates the most messages?" and "which topic generates the most traffic?". You can sort by messages/second to get the most active topics.
Open-source, free, code is at https://github.com/gambitcomminc/golang-mqtt-topn
Video at https://www.youtube.com/watch?v=M1c--mXYl_Q
Installation / Requirements
To install this program, you need to install Go and set your Go workspace first.
Follow instructions for Eclipse Paho Go library https://github.com/eclipse/paho.mqtt.golang
go get github.com/pborman/getopt/v2
go get github.com/gbin/goncurses
go build mqtt-topn.go
Categories: Internet of Things (IoT)
Additional Details
Organization Name: Gambit Communications, Inc.
Development Status: Production/Stable
Date Created: Tuesday, June 2, 2020 - 13:46
License: GPL
Date Updated: Monday, November 3, 2025 - 10:28
Submitted by: Gambit Support
| Date | Ranking | Installs | Clickthroughs |
|---|---|---|---|
| February 2026 | 0/0 | 0 | 5 |
| January 2026 | 0/0 | 0 | 17 |
| December 2025 | 0/0 | 0 | 20 |
| November 2025 | 0/0 | 0 | 21 |
| October 2025 | 0/0 | 0 | 9 |
| September 2025 | 0/0 | 0 | 11 |
| August 2025 | 0/0 | 0 | 10 |
| July 2025 | 0/0 | 0 | 11 |
| June 2025 | 0/0 | 0 | 11 |
| May 2025 | 0/0 | 0 | 13 |
| April 2025 | 0/0 | 0 | 14 |
| March 2025 | 0/0 | 0 | 15 |
