Research and Improvement of Mosquitto Theme Subscription Mechanism
Yuyi Liu, Pin Wang · 2023
In this paper, we discuss and study the topic subscription mechanism of Mosquitto, an open source proxy server of MQTT, point out the defects of its subscription tree structure, and propose to modify and optimize the structure of the subscription tree by using a combination of radix tree and hash table. The constant-level matching time complexity and further compression of the memory space occupied by the subscription tree are achieved, which effectively improves the operational efficiency and stability of Mosquitto under the situation of insufficient system resources.