## 6 Throughput Assessment and Benchmarking Deploy  
Our experimental setup consists of two Raspberry Pi 4 units, each equipped with 8 GB of memory. One unit functions as a performance-testing MQTT client, while the other operates as the MQTT server. We used the latest stable Raspberry OS \"bookworm\" 12.0 on Raspberry nodes. Specific versions of tools are mosquito and mosquito_pub/mosquito_sub 2.0.11, mqtt-benchmarker 0.2.0, mqttx 1.10.1, mqtt-cli 4.32.0, OpenSSL 3.0.14, and TOR 0.4.7.16 for testing. The network configurations tested include IEEE 802.3 ab (1 Gbps Ethernet), IEEE 802.11n/ac (Wi-Fi), and 3 GPP-4G (cellular) connections. All experiments  
Figure 3: MQTT Benchmarking Architecture.  
were conducted using OpenSSL version 3.0.14 for encryption and TOR version 0.4.7.16 in anonymization. This setup allows us to evaluate our proposed MQTT over TOR approach across various network conditions and compare it with standard implementations.  
Several factors must be taken into account to measure network throughput completely. It is necessary to determine which OpenSSL cipher suites are compatible with the MQTT server to prevent data encryption from impeding communication between brokers and IoT devices. The phases of the suggested measuring method are shown in Figure 4, which assesses throughput between any two network nodes. The OpenWRT router is synchronized with Italian time servers to ensure consistent device time sources. It acts as a local NTP server and an NTP client over an MQTT-BRIDGE link with certificates and login credentials.  
For performance analysis, we used the Mosquito-clients package, which allowed a more thorough evaluation compared to other tools (mqtt-benchmarker [50]; mqttx [51]; mqtt-chi [52]), and compared results of 1000 message communications varying QoS type, encryption algorithm, and TLS version, as shown in Figure 5 for 3 GPP-4G, IEEE 802.3 ab, and IEEE 802.11n/ac testbeds.  
In the first run, we use a 5 k-byte payload, and after that, we send a 1 M-byte payload for each message. These metrics include the total ratio, which measures the number of messages sent compared to those received, the average runtime, the total runtime, and the message time metrics, which show the minimum, maximum, mean, and standard deviation of message transit times. We also evaluate total bandwidth (messages per second during benchmarking) and average bandwidth (messages per second). The investigation examines cryptographic methods, authorization protocols, and adherence to legal standards as key components of information protection. It also explores network response times, data transmission reliability, and accuracy of information transfer. The study underscores the importance of safeguarding sensitive information, particularly in critical sectors such as medical services, banking systems, and essential infrastructure surveillance.  
Figure 4: Algorithm flowchart.  
Our study evaluates information accuracy, transmission reliability, and communication delays to ensure the fidelity and robustness of data collected from sensing devices. Data confidentiality must be emphasized, particularly in delicate industries like healthcare, finance, and vital infrastructure monitoring. To preserve data security, we go over encryption techniques, access limits, and adherence to data protection laws. Ensuring the implementation of these measures ensures the integrity and confidentiality of the gathered measurements.