SPONSORED BY: PROSYS OPC
For the past years, OPC UA has become a significant trend all over the globe, with many companies implementing the technology in their customized and advanced solutions. In particular, one of the hottest new trends is PubSub (Publisher/Subscriber) technology.
The OPC UA PubSub specification adds a Publisher/Subscriber communication pattern to OPC UA applications. The primary advantage of this communication pattern is to decouple the message producer from the consumer. Even though the PubSub model was defined already in OPC UA 1.04 that came out four years ago, many companies have only recently started adopting it. In fact, this year, we have noticed a rapid increase in the demand for PubSub technology, especially for cloud-based systems.
OPC UA PubSub Explained
On November 16, 2021, the Finnish Society of Automation (FSA) hosted the OPC Day Finland 2021. The central theme of the event was success stories with OPC UA. During the event, OPC UA experts worldwide shared their knowledge and experience on the technology. The main host of the event was Jouni Aro, the CTO of Prosys OPC, in his role as the Chairman of the OPC Committee of FSA.
After hosting the long day of prestigious guest speakers, Jouni also gave a talk where he explained the OPC UA PubSub technology (OPC UA Specification Part 14), its definitions, and the main differences from the Client/Server model. In his presentation, he also provided various scenarios where the companies can implement the PubSub model and improve the solutions currently available on the market. At the end of the presentation, after the theoretical part, listeners were presented with several PubSub demos that are currently being implemented and developed at Prosys OPC.
Connecting OPC UA Publisher to Azure with MQTT
At Prosys OPC, the core product that supports the PubSub model is the Prosys OPC UA SDK for Java toolkit. Implementation of the OPC UA PubSub (Publisher/Subscriber) functionality in the SDK for Java allowed our team to also update the Azure communication used in previous projects to utilize the new PubSub features. Previously, the team used the Microsoft OPC Publisher module for data transfer from an OPC UA server to Azure. However, since Azure IoT Hub also allows direct connection using the MQTT protocol, one of the main goals was to replace that component with a PubSub publisher and prove that Prosys OPC UA SDK for Java is capable of publishing OPC UA data directly to Azure from, where it, for example, can be sent to Power BI to be visualized.
Connecting OPC UA Publisher to AWS IoT
The Prosys OPC Team worked together with Jan Borch, an IoT Solution Architect at Amazon Web Services, to provide a detailed guide that explains how to use the OPC UA PubSub concept with AWS IoT.
The guide showcases the common industrial IoT use case to publish data from OPC UA servers running at the industrial edge to applications running in the cloud to perform big data analytics or predictive maintenance.
The OPC UA Publisher connects to AWS IoT Core using MQTT over secure mTLS. It then starts publishing JSON encoded data and metadata. AWS IoT Core uses security certificates to authenticate the OPC UA Publisher. Once data lands in the AWS Cloud, the AWS IoT Core rule engine can be used to forward the messages to a downstream cloud application, a time series database such as Amazon Timestream or an AWS service such as AWS IoT SiteWise, AWS IoT Events, AWS IoT Analytics or one of the other 25 supported AWS service integrations.