OVL as Kafka Source Connector
Logging industrial data to Kafka made easier!
Our ogamma Visual Logger for OPC now can be deployed as Apache Kafka Source Connector!
Works well with Cofluent and Redpanda Connect implementations.
Our ogamma Visual Logger for OPC now can be deployed as Apache Kafka Source Connector!
Works well with Cofluent and Redpanda Connect implementations.
The YouTube video about this new feature is available below.
The full list of changes is described in the Release Notes document available at https://onewayautomation.com/1WA/ReleaseNotes.html
Recently, one of our customers asked: What OPC UA Servers are available to test OPC UA client applications, such as ogamma Visual Logger for OPC? In other words, they needed to simulate a data stream that an OPC UA Client could ingest using the OPC UA Server interface.
There are many demo/simulation OPC UA servers available that you can either download and run on your PCs, and also there are some already running instances with public endpoints available to connect over the Internet. Here is the list:
| Product name | Vendor | Platform | Link |
| OPC UA Simulation Server | Prosys OPC | Windows, Linux, MacOS | https://prosysopc.com/products/opc-ua-simulation-server/ |
| OPC UA C++ Demo Server | Unified Automation | Windows |
https://www.unified-automation.com/downloads/opc-ua-servers.html Requires registration (free) to download Public endpoint: opc.tcp://opcuaserver.com:48010 |
| Eclipse Milo OPC UA Demo Server | Open-source, the main contributor is Kevin Herron (Inductive Automation). | Written in Java, runs on Windows, Linux, Docker. |
https://github.com/digitalpetri/opc-ua-demo-server Public OPC UA endpoint URL: opc.tcp://milo.digitalpetri.com:62541/milo |
| OPC PLC Server | Microsoft | Cross-platform .NET application. Runs on Windows, Linux, Docker |
Docker image: mcr.microsoft.com/iotedge/opc-plc |
| Node OPC UA Server | Sterfive | Cross-platform | Public endpoint: opc.tcp://opcuademo.sterfive.com:26543 |
With a re-designed distribution package, you don’t need to build dependencies. Now, it’s easier to evaluate and you can start using it in minutes!
✅ Designed by Developers for Developers, so it implements all heavy lifting functionalities. This translates to writing minimal code to communicate with OPC UA Servers.
✅ Compared to other SDKs for C/C++, implementing your application using our SDK is way faster. This leads to project development with a lower budget and shorter timelines.
✅ Makes coding more enjoyable by featuring utilities and helpers!
✅ Automatically reconnects to OPC UA servers, recreating subscriptions and monitored items.
✅ Our simple API fully utilizes the power of modern C++
✅ Uses native C++ base data types (without SDK-specific types).
✅ Uses asynchronous & synchronous calls, and callbacks.
✅ Supports complex data types, enabling values to be easily converted to JSON or string format.
It is very common to read about MQTT protocol that it is very lightweight in terms of network traffic:
MQTT is an OASIS standard messaging protocol for the Internet of Things (IoT). It is designed as an extremely lightweight publish/subscribe messaging transport that is ideal for connecting remote devices with a small code footprint and minimal network bandwidth.
(Quote from MQTT home page).
At the same time, OPC UA is often considered heavier than MQTT.
For me, this was not something obvious and expected. Because the most popular encoding used in OPC UA is TCP binary, which usually is more efficient and lightweight than free text formatting used in MQTT payloads.
When I found this report by Johnathan Hottell, about OPC UA and MQTT benchmarks and saw that the MQTT payload is JSON formatted (in which each data value transferred includes multiple key-value pairs, for the values itself and for the timestamp), I thought, how come this can be lighter than OPC UA binary formatted payload? And decided to reproduce these tests myself.
In the initial tests, I picked the same number and type of data variables. And later decided to re-run tests, in a more controlled setup. I thought that for easier reproducing, it is worth using a popular and easily available OPC UA server as a data source, which can provide simulated data. OPC UA C++ Demo Server from Unified Automation was the obvious choice. The set of default variables does not have a number of variables of types used in the tests run by Johnathan Hottell, therefore I had to select a different set of variable types, but still, the total number of variables is 24. Their node identifiers can be found in the Excel file with test results.
EMQX broker running as a Docker container was chosen, because of easy deployment and use, and support for secured connections out of the box, without generating and installing the SSL certificate.
2 applications that can convert OPC UA data to MQTT were used:
Using OPC UA to MQTT converter applications makes sure that the same data values are collected over OPC UA connection, and then published to the MQTT broker, as well as received by the subscriber application.
As MQTT Subscriber, MQTT Explorer version 0.4.0 Beta-1 was used.
To capture OPC UA and MQTT packets, WireShark was used. 2 instances – 1 for OPC UA traffic on port 48010 was running, and the second for MQTT traffic on port 1883 for non-secure connections, and 8883 for secured connections.
For each test case, 4 metrics were collected:
Each test application is configured to collect data from the OPC UA Server for selected 24 variables and log data to the MQTT broker. For configuration steps, please refer to the documentation of the product.
In the OPC UA side, both Sampling interval and Publishing should be set to 1 second.
MQTT Topics for variables in ogamma Visual Logger for OPC were set to Test24/[VariableDisplayName]. For example, for the variable with browse path Objects/Demo/001_Dynamic/Scalar/Boolean it is set to Test24/Boolean.
In Cogent DataHub, topics were a little bit longer, set to Test24/[Browse Path]. For example, Test/Demo/Dynamic/Scalar/Boolean.
The MQTT payload was set to the variable value, converted to a string (not JSON format, to keep payload size smaller).
Test applications should be shut down before starting tests.
First, 2 Wireshark instances should start. They should not detect any packets yet. Then one of the test applications starts. Wireshark should display captured packets. After 5 minutes, the test application stops, and no more network activity should be seen in Wireshark. Capturing stops, and packets saved into files. And then metrics can be taken: file size and data displayed in the dialog window Statistics / Protocol Hierarchy.
For each application used (ogamma Visual Logger for OPC and Cogent DataHub), tests run 4 times:
Zip file with all captured packet files and test results in Excel file can be downloaded from here.
The summary of collected test results is given in the table below.
Total network traffic in the case of using MQTT protocol is multiple times (from 3.76 to 7.91 depending on the test case) higher than in OPC UA. Which does not correlate with results published by Johnathan Hottell.
It would be interesting to see what the metrics would look like if the MQTT payload is formatted in SparkPlugB, especially in compressed format. We did not have such an application converting from OPC UA to SparkPlugB (not implemented yet in our application, but it is in the roadmap, so stay tuned!). Perhaps in this case results will correlate with the results published by Johnathan Hottell.
If you can reproduce such tests, please share them with us!