###### Abstract  
The Publisher-Subscriber model of data exchange has been a popular method for many Internet-based applications, including the Internet of Things (IoT). A traditional PS system consists of publishers, subscribers, and a broker. The publishers create new data for a registered topic, and the data broker relays the data to the corresponding subscribers. This paper introduces a blockchain-based smart broker for the publisher-subscriber (PS) framework for the IoT network. As IoT data comes from devices operating in various environments, it may suffer from multiple challenges, such as hardware failures, connectivity issues, and external vulnerabilities, thereby impacting data quality in terms of accuracy and timeliness. It is important to monitor this data and inform subscribers about its quality. The proposed smart broker is composed of multiple smart contracts that continuously monitor the quality of the topic data by assessing its relationship with other related topics and its drift or delay in publishing intervals. It assigns a reputation score to each topic computed based on its quality and drifts, and it passes both the original data and the reputation score as a measure of quality to the subscriber. Furthermore, the smart broker can suggest substitute topics to subscribers when the requested topic data are unavailable or of very poor quality. The evaluation shows that a smart broker efficiently monitors the reputation of the topic data, and its efficiency increases notably when the data quality is worse. As the broker is run inside the blockchain, it automatically inherits the advantages of the blockchain, and the quality scoring is indisputable based on immutable data. blockchain; data broker; data quality; internet of things; publisher subscriber model +
Footnote †: journal: Applied Sciences  
1  
Footnote  
+++ ==WARNING: Truncated because of repetitions==
13: email: {}  
++  
Such brokers also do not have the analytical capabilities to compare the data streams with each other by design. The subscribers determine the quality or trust of the data upon receiving them at their end. In our proposed approach, the smart broker is given more power--monitoring and comparison. The smart broker already receives a range of data from various sources as real-time streams. Obviously, there are no guaranteed relationships between such streams; however, over time, the smart broker can learn the bigger picture of an IoT system's situation based on all the sensor data associated with it. Based on this, the smart broker can pass on a comment to the subscriber about the quality of the data. This avoids revealing actual data from unauthorized streams to a particular subscriber but still provides additional information. In this paper, we deal with the quality of the data in terms of individual device performance. The quality issue may result from either the IoT end device's own failures or due to an actual environmental change. It is assumed that an IoT sensor network is deployed in close proximity, monitoring the same target objects/space, and should agree with those other related devices [12]. This relationship of the devices due to deployment means one can make a group of devices that are closely related (directly or inversely), and this is exploited to characterize the quality of the data coming into a PS topic from a single device. Usually, data brokers in the IoT do not recognize unreliable devices or publishers and detect the generation of unreliable data. This paper introduces a _smart broker_ with a new blockchain-driven architecture designed to ensure acceptable data quality for subscribers. The new contributions are with regard to components of the _smart broker_, as follows:  
1. An innovative topic drift monitoring module that keeps track of data publishing schedules. 2. A data quality assessment module. This module evaluates the quality of the data on the publisher's topics.