Supported functions
The following table gives an overview of all supported functions. In general, both MQTT 3.1.1 (hereafter referred to as MQTT3) and MQTT 5.0 (hereafter referred to as MQTT5) are supported.
Function | Supported in | Min. TwinCAT version | Description |
---|---|---|---|
User authentication | MQTT3/MQTT5 | 3.1 Build 4022.0 | A user name/password combination can be used to log in to the message broker. |
Cipher Suites | MQTT3/MQTT5 | 3.1 Build 4022.0 | Specification of the Cipher Suites to be used. |
Clean Session | MQTT3/MQTT5 | 3.1 Build 4022.0 | The use of CleanSession is currently supported only if CleanSession = TRUE. |
Client-ID | MQTT3/MQTT5 | 3.1 Build 4022.0 | Specification of an MQTT Client-ID. |
Connection acknowledgement | MQTT5 | 3.1 Build 4026.0 | The Connection Acknowledgement feature can be used. |
Data format | MQTT3/MQTT5 | 3.1 Build 4022.0 | The data format can be freely defined. Appropriate auxiliary libraries for easy use of JSON and XML are available. |
Keep Alive | MQTT3/MQTT5 | 3.1 Build 4022.0 | Set the KeepAlive value for the MQTT connection. |
Last Will | MQTT3/MQTT5 | 3.1 Build 4022.0 | Definition of a Last Will message. |
Message expiry interval | MQTT5 | 3.1 Build 4026.0 | The Message expiry interval can be set. |
Pre-Shared Key (PSK) | MQTT3/MQTT5 | 3.1 Build 4022.0 | A PSK can be used to secure the transport channel (using TLS). |
Publish | MQTT3/MQTT5 | 3.1 Build 4022.0 | Sending (publishing) messages to a topic. |
QoS 0, 1, 2 | MQTT3/MQTT5 | 3.1 Build 4022.0 | The QoS levels 0, 1 and 2 can be used for publish and subscribe operations. |
Reason codes | MQTT5 | 3.1 Build 4026.0 | Reason codes can be received and evaluated. |
Request/Response | MQTT5 | 3.1 Build 4026.0 | Send/receive messages based on the Request/Response method. |
Retain | MQTT3/MQTT5 | 3.1 Build 4022.0 | Messages can be flagged with Retain during the Publish process. |
Session expiry interval | MQTT5 | 3.1 Build 4026.0 | The Session expiry interval can be set and used. |
Subscribe/Unsubscribe | MQTT3/MQTT5 | 3.1 Build 4022.0 | Create a subscription to a topic to receive messages. |
Topics | MQTT3/MQTT5 | 3.1 Build 4022.0 | Topic hierarchies can be defined freely. |
Transport Layer Security (TLS) version 1.1, 1.2 and 1.3 | MQTT3/MQTT5 | 3.1 Build 4022.0 | TLS can be used to secure the transport channel. |
User Properties | MQTT5 | 3.1 Build 4026.0 | Using User Properties to define metadata on a message. |
Wildcard Subscriptions | MQTT3/MQTT5 | 3.1 Build 4022.0 | Use of wildcards (#, +) for a subscription. |
Certificates | MQTT3/MQTT5 | 3.1 Build 4022.0 | Certificates can be used to secure the transport channel (using TLS). The PEM format is used here. |
Certificate revocation lists | MQTT3/MQTT5 | 3.1 Build 4022.0 | Use of certificate revocation lists. |