Towards Resilient IoT Messaging: An Experience Report Analyzing MQTT Brokers
Sten Gruener, Heiko Koziolek, Julius Rückert · 2021
Many Internet-of-Things (IoT) applications for smart homes, connected factories, or car-to-car communication utilize broker-based publish/subscribe communication protocols, such as the MQTT protocol. Commercial IoT applications have high reliability requirements for messaging, as lost messages due to unstable Internet connections or node failures can harm devices or even human beings. MQTT brokers implement numerous architectural availability tactics, but former analyses of MQTT communication have mainly focused on performance measurements under stable conditions. We have created the MAYHEM resilience testing tool for MQTT brokers and applied it in various resilience experiments on different MQTT brokers (VerneMQ, Mosquitto, HiveMQ, EMQ X). We found that MQTT QoS level 0 is already robust against minor packet loss, that selected broker message persistency solutions can lead to lost messages, and that most clustered MQTT brokers favor availability and performance over communication integrity. The results can support IoT practitioners in architectural decisions and researchers as well as broker vendors in optimizing designs and implementations.