abstractMqttDriver-AbstractMqttDevice
This driver supports four MQTT device components that communicate with the broker: AbstractMqttDevice, DefaultMqttDevice, AwsMqttDevice and GcpMqttDevice. The only difference among them is that the AbstractMqttDevice does not provide communication security, which means that it does not include an authenticator component. You configure the device by setting its properties to match the settings for the broker.

To access these properties, expand and double-click a device object in the Nav tree.
In addition to the standard properties (Status, Enabled, Fault Cause, Health, Alarm Source Info, and Poll Frequency), these properties are unique to these components.
| Property | Value | Description |
|---|---|---|
| Message for L W T | read-only | Reports the Last Will and Testament (last known good value) when an unexpected error occurs. |
| Clean Session | true or false (default) | Controls the persistence of the session between broker and
client. true enables a clean session that is not persistent. All information is lost when the client disconnects from the broker for any reason. false disables the clean session creating a persistent session. The driver preserves this session until the client requests a clean session again. If a session is already available, the driver uses it and delivers any queued messages to the client. |
| Enable L W T | true or false (default) | Turns on (true) and off (false) the Last-Will-and-Testament feature. |
| Topic for L W T | read-only | Reports the topic that contains the Last Will and Testament value. |
| Qos for L W T | drop-down list | Defines the Qos (Quality of Service)
level, which configures how persistently the broker and client attempt
to ensure that a message is received. Fire And Forget (0) delivers the message once with no confirmation. Atleast Once (1) delivers the message at least once with confirmation required. Exactly Once (2) delivers the message exactly once by using a four-step handshake. Messages may be sent at any Qos level, and clients may attempt to subscribe to topics at any Qos level. |
| Retained for L W T | true (default) or false | Configures the broker to save
the message for the specified topic as its Last Will and Testament
(last known good value). It is useful for newly-connected subscribers to receive the last retained message for the topic immediately after subscribing and extremely helpful to provide status updates from components and devices on individual topics. |
| Keep Alive | seconds | Defines the longest period during which the broker and client
can remain connected without sending a message. The broker must disconnect
a client that does not send a PINGREQ (ping request) or another message
within this period. To ensure that the connection remains open and both client and broker remain connected, the client sends this time interval to the broker during the establishment of the connection. This provides Abstract MQTT with a work-around for the issue of half-open connections. |
| Connection Timeout | seconds | Specifies the maximum amount of time the client waits after sending a request to the broker. |
| Status Message | text | Reports the current status of the component. |
| Points | folder | Contains the discovered points. |
| Send Enum As | drop-down list (defaults to TAG) | Configures how to transmit an enum value. TAG ORDINAL |
| authenticator (available using DefaultMqttDevice component only) | additional properties | Defines the authenticator component to use for this device. An authenticator secures the connection between the client and broker. |
Actions
These actions are available on both components. To perform an action, right-click the device in the Nav tree and click Actions followed by selecting the action.
| Action | Description |
|---|---|
| Ping | This checks the device status. |
| Connect | Establishes a connection with a broker. |
| Disconnect | Disconnects session with a broker. |
| Subscribe all | Subscribes clients for all topics. |
| Unsubscribe all | Unsubscribes clients from all topics |
The Ip address, Client ID, and port number of the broker must be entered for Connect and Disconnect actions to work.