## 3 Related Work
### MQTT Multi-Broker Related Work  
Multi-broker MQTT architectures have been investigated to improve the resilience and scalability of MQTT-based IoT environments. [PERSON] et al. [21] proposed a multi-tier MQTT architecture based on fog computing, where each MQTT broker is equipped with an authentication manager responsible for mutual authentication between entities. Their approach introduces a lightweight authentication scheme that combines hash functions with XOR operations, targeting reduced storage and communication overhead. Their evaluation reports an 89% reduction in storage overhead and a 23% reduction in communication overhead, highlighting its efficiency and scalability in industrial IoT scenarios. The focus and contributions of the current work differ in both scope and depth. Rather than addressing authentication as the primary security concern, this research centers on the confidentiality and integrity of IoT e-health data at the edge and end-to-end security when data moves to the cloud. Also, there are other papers that introduced a similar multi-layer MQTT without focusing on encryption, like the work presented in [22; 23].  
HECS4 MQTT addresses a clear gap in current work, where existing solutions either employ strong encryption mechanisms such as TLS, AES, or identity-based encryption that are unsuitable for resource-constrained IoT devices or rely solely on lightweight encryption schemes that lack sufficient protection when data moves beyond the edge to less trusted environments such as the cloud. Compared to existing works, our proposed architecture integrates lightweight encryption at the edge--where IoT devices operate under strict resource constraints--and applies robust end-to-end encryption when transmitting data from hospital premises to the cloud. This layered encryption approach is embedded within a scalable MQTT framework, where multiple brokers are deployed to localize traffic and reduce bottlenecks across distributed hospital networks. In our system, each local broker is responsible for managing encrypted communication from resource-constrained publishers, enabling low-latency and energy-efficient data transmission. As data transitions from the edge to external cloud platforms, additional encryption layers are applied, ensuring end-to-end security across potentially untrusted network segments. This separation of encryption responsibilities between the edge and the cloud ensures that encryption protocols are tailored to the capabilities of each system component. This layered design mitigates risks associated with centralized processing, reduces latency, and enhances message reliability. The use of multi-broker coordination further enables healthcare providers to access encrypted patient data from any authorized endpoint while maintaining compliance with privacy regulations and ensuring cryptographic resilience throughout the data lifecycle.  
While many of these studies evaluate individual encryption methods or architectural components, relatively few integrate a full-stack, real-time system that combines layered encryption, MQTT-based transmission, and multi-level broker infrastructure tailored for healthcare environments. This work aims to address this gap by proposing and implementing a complete secure communication pipeline--from IoT publisher nodes through local and cloud brokers to end-user subscriber applications--while benchmarking multiple lightweight encryption schemes under realistic operational conditions.