# A Reliable Publish-Subscribe Mechanism for Internet of Things-Enabled Smart Greenhouses
## 4 Performance Evaluation
### Result
#### 4.3.2 Subscription Throughput Evaluation Results with the Number of Messages  
Figures 8 and 9 show the subscription throughput of non-scalable and scalable brokers in both traditional and proposed architecture at all QoS levels, respectively. There are significant changes in the results of our proposed structure for non-scalable brokers by three QoS levels. See Figure 8. Another interesting point is that the proposed Bevywise MQTT Route 2.0 broker has the highest amount of throughput only at the QoS level, while the other broker sees an upward trend at the QoS1 and 2 levels. This means that brokers with higher throughput results subscribe the messages to the brokers at a higher speed and more efficiency. Regarding Figure 9, the proposed ActiveMQ 5.15.8 broker grows more steeply than the proposed EMQ X 4.0.8 at all QoS categories. Meanwhile, the high throughput value of brokers utilizing our proposed architecture compared to brokers with the traditional architecture indicates that brokers can manage a large number of messages simultaneously and ensure that messages are delivered quickly. In addition, a high throughput improves reliability and scalability by effectively addressing message traffic and minimizing the probability of missing or lost messages. In other words, the sign of a high subscription throughput is that the MQTT broker can quickly and efficiently route messages to the appropriate subscribers without impacting the overall performance of the system. This ensures that messages are delivered in a timely and reliable manner, which is crucial for many IoT applications [43,44].  
Sorting the proposed MQTT brokers based on the subscription throughput (from highest to lowest: left to right). At QoS0: Bevywise MQTT Route 2.0, Mosquito 1.4.15, ActiveMQ 5.15.8, EMQ X 4.0.8. At QoS1: Mosquito 1.4.15, ActiveMQ 5.15.8, EMQ X 4.0.8, Bevywise MQTT Route 2.0. At QoS2: ActiveMQ 5.15.8, Mosquito 1.4.15, Bevywise MQTT Route 2.0, EMQ X 4.0.8.  
Sorting all brokers according to the message processing time based on Figure 5 (from highest to lowest: bottom to top). At QoS0: ActiveMQ 5.15.8, Mosquito 1.4.15, Bevywise MQTT Route 2.0, EMQ X 4.0.8. At QoS1: ActiveMQ 5.15.8, Mosquito 1.4.15, EMQ X 4.0.8, Bevywise MQTT Route 2.0. At QoS2: ActiveMQ 5.15.8, Mosquito 1.4.15, Bevywise MQTT Route 2.0, EMQ X 4.0.8.  
Sorting both scalable and non-scalable brokers with our proposed mechanism based on the number of messages (from highest to lowest: right to left). At QoS0: ActiveMQ 5.15.8, Bevywise MQTT Route 2.0, Mosquito 1.4.15, EMQ X 4.0.8. At QoS1: ActiveMQ  
Figure 7: The number of messages from scalable brokers in both original and proposed architectures across all QoS categories.  
5.15.8, Mosquito 1.4.15, EMQ X 4.0.8, Bevywise MQTT Route 2.0. At QoS2: ActiveMQ 5.15.8, Mosquito 1.4.15, Bevywise MQTT Route 2.0, EMQ X 4.0.8.  
To summarize our evaluation experiments, we can state that ActiveMQ scales well to beat all other brokers' performance on our proposed pub-sub mechanism and topic categorizations in a greenhouse environment. It is the most reliable scalable broker examination we have ever assessed. EMQ X also performs well with our proposed architecture for the greenhouse environment. On the other hand, if the hardware is resource-constrained (Performance), then Mosquito or Bevywise MQTT Route can be taken as better choices over non-scalable brokers [25].  
Figure 8: Subscription throughput (msgs/s) of non-scalable brokers in both the original and proposed architectures across all QoS levels.  
Figure 9: Subscription throughput (msgs/s) of scalable brokers in both the original and proposed architectures across all QoS levels.