MQTT Tasks
Properties Configuration Settings
The MQTT Component implements a lightweight, fully-featured MQTT client.
Remarks
The MQTT Task provides a lightweight, fully-featured MQTT client implementation with support for version 3.1.1 and 5.0. The Task supports plaintext and TLS-enabled connections over both standard TCP and WebSockets.
MQTT Send Task
At a minimum, you must supply an RemoteHost, RemotePort, and ClientId for the connection. In order to authenticate with the MQTT server you will need to specify a User and Password. Topic and QOS should be set to publish a message to the specified Topic at the set QOS level.
The MQTT Task has support for SSL transport layer security. This may be enabled by setting SSLStartMode, SSLCert and SSLAcceptServerCert to appropriate values.
Sender Property List
The following is the full list of the properties of the sender task with short descriptions. Click on the links for further details.
CleanSession | Determines whether a clean session is used once connected. |
ClientId | A string that uniquely identifies this instance of the component to the server. |
Firewall | A set of properties related to firewall access. |
LogFile | The file to write logging information to at runtime. |
LogMode | What information gets logged during component execution. |
MessageText | The messages payload. |
Other | Defines a set of configuration settings to be used by the component. |
Password | A password if authentication is to be used. |
PersistentConnection | Instructs the component whether to keep the connection to the server open. |
ProtocolVersion | The MQTT protocol version that the component will conform to. |
QOS | The messages QoS level. |
RemoteHost | The address of the remote host. Domain names are resolved to IP addresses. |
RemotePort | The port of the MQTT server (default is 1883). The default port for SSL is 8883. |
RuntimeLicense | Specifies the component runtime license key. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLAcceptServerCertAcceptAny | Tells the component to accept any server certificate. |
SSLCert | The certificate to use for client authentication during the SSL handshake. |
SSLStartMode | Determines how the component starts the SSL negotiation. |
Timeout | A timeout for the component. |
Topic | The topic to subscribe or publish to. |
User | A username if authentication is to be used. |
WillMessage | The message that the server should publish in the event of an ungraceful disconnection. |
WillTopic | The topic that the server should publish the WillMessage to in the event of an ungraceful disconnection. |
Configuration Settings
The following is a list of configuration settings for the task with short descriptions. Click on the links for further details.
AutoReconnect | Whether to automatically attempt to reconnect in the event of a connection error. |
ClientTopicAliasMax | The maximum value the client will accept for a topic alias sent by the server. |
ConnectionTimeout | How long to wait for a connection attempt to succeed. |
ConnectProperties | JSON string specifying properties to be included in the CONNECT packet. |
DisconnectProperties | JSON string containing DISCONNECT packet properties. |
DisconnectReasonCode | Code describing the reason the client or server closed the connection. |
Duplicate | Whether to set the Duplicate flag when publishing a message. |
LogLevel | The level of detail that is logged. |
OutgoingMessageProperties | JSON string specifying properties to be included in the PUBLISH packet. |
RepublishInterval | How many seconds to wait before republishing unacknowledged messages. |
ResponseTopic | Topic name for a response message. |
Retain | Whether to set the Retain flag when publishing a message. |
SendCustomPacket | Sends a packet constructed using the supplied hex byte string. |
SessionExpInterval | The length of time in seconds the client and server should store session state data after the connection is closed. |
SessionStateFile | File to use for saving and restoring session data. |
SubscriptionIdentifier | A numeric subscription identifier included in SUBSCRIBE packet which will be returned with messages delivered for that subscription. |
TopicAlias | Value that is used to identify the Topic instead of using the Topic Name in order to reduce packet size. |
TopicDelimiter | The string to use as a delimiter in a topic filter list string. |
TopicNLArray | List of No Local option flags for subscription topic filters. |
TopicQOSArray | Comma-separated list of topic filter QoS values to use when subscribing. |
TopicRAPArray | List of Retain As Published option flags for subscription topic filters. |
TopicRHArray | List of Retain Handling option values for subscription topic filters. |
WillProperties | JSON string specifying will properties to be included in the CONNECT packet. |
WillQOS | The QoS value to use for the Will message. |
WillRetain | Whether the server should retain the Will message after publishing it. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLSecurityFlags | Flags that control certificate verification. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |