MQTT communication packages
There are various software libraries that provide MQTT communication capability, and they differ in many aspects such as the protocol versions and features supported, target platforms, licensing etc. OPC Labs software uses pluggable MQTT communication packages, and therefore you can decide which of these libraries to use. Each MQTT library is wrapped in a communication package, which provides interface to the rest of OPC Labs software. Some communication packages are built-in, i.e. they are always available, do not require additional artifacts for their operation, and are licensed together with the base product and under the same conditions.
The available MQTT communication packages are described in the table below, together with the underlying software (library) they use. The table may also contain columns for MQTT libraries for which no communication package is available yet, but is in consideration or development.
Communication package | OpcLabs.Mqtt | OpcLabs.MqttNet | n/a | file-based emulation |
---|---|---|---|---|
Documentation | OpcLabs.Mqtt communication package | OpcLabs.MqttNet communication package | Will be developed if need arises | File-based MQTT emulation |
Roles | MQTT Client | MQTT Client | MQTT Client | |
Target platforms | .NETFramework 4.7.2, net6.0 | .NETFramework 4.7.2, net6.0 | .NETFramework 4.7.2, net6.0 | |
NuGet package | OpcLabs.Mqtt | OpcLabs.MqttNet | The package is built-in | |
Python package | opclabs-mqtt | opclabs-mqttnet | ||
ZIP package (for COM) | OpcLabs.Mqtt | OpcLabs.MqttNet | ||
Underlying software | System.Net.Mqtt (code name Hermes) | MQTTnet, MQTTnet.Extensions.ManagedClient |
M2MqttDotnetCore | |
Author | Xamarin (Microsoft) | Christian Kratky | ||
Version used | 0.6.0-beta | 4.3.3.952[1] | 1.0.8 | |
Current version[2] | 0.6.16-beta | 4.3.3.952 | 1.1.0 | |
License | MIT License | MIT License | Eclipse Public License 1.0 | |
Project site/documentation | https://github.com/xamarin/mqtt | https://github.com/chkr1011/MQTTnet/wiki | https://m2mqtt.wordpress.com/ | |
Code repository | https://github.com/xamarin/mqtt | https://github.com/chkr1011/MQTTnet | https://github.com/mohaqeq/paho.mqtt.m2mqtt | |
MQTT versions | 3.1.1 | 3.1.0, 3.1.1, 5.0.0 | ||
Roles | Client, Server | Client, Server | Client | |
Transport protocols | TCP | TCP, TCP+TLS, WS, WSS | TCP, TCP+TLS | |
Target platform | .NETFramework 4.6, .NETStandard2.0 | .NETStandard 1.3, .NETStandard 2.0, UAP 10.0 | .NETStandard 2.0 | |
NuGet packages | System.Net.Mqtt | MQTTnet, MQTTnet.Extensions.ManagedClient |
M2MqttDotnetCore |
Currently, we recommend to use the OpcLabs.MqttNet communication package, and it is set as default. The underlying library has most features, and is it the only one that appears to be under active development. You can switch to a different communication package if you like (see Using communication packages). You can even develop your own communication package if needed (contact us for information to that).
For details on how to work with a particular communication package (such as what is the format of the URL strings used, or how to configure it), see the links in the Documentation row under Communication package in the table above.