🤖 AI Summary
This work addresses the lack of systematic performance evaluation for message-oriented middleware in resource-constrained IoT edge computing environments, which complicates middleware selection. To bridge this gap, the authors propose mq-bench, a unified benchmarking framework that conducts large-scale concurrent evaluations of eight mainstream message brokers—including Mosquitto, EMQX, RabbitMQ, and NATS—across three representative edge hardware platforms. The assessment encompasses key performance dimensions such as latency, throughput, and resource consumption. For the first time under a consistent experimental setup, the study contrasts lightweight and enterprise-grade brokers, uncovering how architectural design choices influence scalability and resource efficiency. Based on these insights, the paper provides practical deployment guidelines tailored to diverse IoT application scenarios.
📝 Abstract
Asynchronous messaging is a cornerstone of modern distributed systems, enabling decoupled communication for scalable and resilient applications. Today's message queue (MQ) ecosystem spans a wide range of designs, from high-throughput streaming platforms to lightweight protocols tailored for edge and IoT environments. Despite this diversity, choosing an appropriate MQ system remains difficult. Existing evaluations largely focus on throughput and latency on fixed hardware, while overlooking CPU and memory footprint and the effects of resource constraints, factors that are critical for edge and IoT deployments. In this paper, we present a systematic performance study of eight prominent message brokers: Mosquitto, EMQX, HiveMQ, RabbitMQ, ActiveMQ Artemis, NATS Server, Redis (Pub/Sub), and Zenoh Router. We introduce mq-bench, a unified benchmarking framework to evaluate these systems under identical conditions, scaling up to 10,000 concurrent client pairs across three VM configurations representative of edge hardware. This study reveals several interesting and sometimes counter-intuitive insights. Lightweight native brokers achieve sub-millisecond latency, while feature-rich enterprise platforms incur 2-3X higher overhead. Under high connection loads, multi-threaded brokers like NATS and Zenoh scale efficiently, whereas the widely-deployed Mosquitto saturates earlier due to its single-threaded architecture. We also find that Java-based brokers consume significantly more memory than native implementations, which has important implications for memory-constrained edge deployments. Based on these findings, we provide practical deployment guidelines that map workload requirements and resource constraints to appropriate broker choices for telemetry, streaming analytics, and IoT use cases.