Add a MQTT Application
Use MQTT to egress data from
FactoryTalk Edge Gateway
. Set the MQTT configuration settings.To add a MQTT application
- In the top-right corner, selectOnlineto go online with the gateway.FactoryTalk Edge Gatewaydisplays a green banner:Gateway Connection: Online.
- SelectData Flow>Applications.
- To add the first application, selectAdd Application.
- To add a subsequent application, selectAdd
.
- FromSelect Application, select an application
- SelectNext.
- Set these parameters:
- Application Name:Input the name of the application.
- MQTT Broker Path:Input the path to the MQTT broker.
- Port:Input a port number. The default port number is 1883.
- MQTT Topic:The MQTT topic under whichFactoryTalk Edge Gatewaypublishes configured models and tags. The gateway name appears by default in the data published to the topic.
- Client ID:Input the client name or ID that the MQTT broker uses to track subscriptions.This ID must be a unique identifier for theFactoryTalk Edge Gatewayconnection to the broker. If multiple MQTT Gateway applications send data, change this ID to something different than the other gateway application IDs. The ID is not generated automatically but does have a default value that should be unique unless other gateway MQTT applications are deployed.
- QoS:Quality of Service. Defines the effort produced by the broker/client to ensure that a message is received. The broker sends messages at any QoS level.
- At most once:The message is delivered once, with no confirmation.
- At least once:The message is delivered at least once, with confirmation required.
- Exactly once:The message is delivered once by using a four-step handshake.
- Enable Retain:Signals the broker to keep theFactoryTalk Edge Gatewaymessage after sending it to subscribers.
- Enable Flat Payload: Select the "Enable Flat Payload" checkbox to flatten the MQTT payload structure. This flatten payload is required for PLEX APM applications. See below figure for an example of the flatten payload.Flat Payload
- Clean Session:When the connection is interrupted, the broker retains the MQTT session and the session state information (including the partial QoS handshake state). WhenFactoryTalk Edge Gatewayreconnects to the broker, the previous session state is maintained for the new connection.
- Security:Set security to log in to the broker.
- Username:Input the username to log in to the broker.
- Password:Input the password to log in to the broker.
- SSL/TLS:Allows encrypted communication to the broker.
- CA Certificate File:Input the path to a CA certificate file in X.509 PEM format.
- Client Certificate File:Input the path to the client certificate file. The client certificate (if required by the broker configuration) validates the authenticity of the gateway as a client to the broker. The client certificate does not need to be unique to any specific client, but the CA certificate must sign it.
- Client Private Key File:Input the path to the client private key. This is the path to a key file in X.509 PEM format associated with the client certificate.
- Client Private Key Passphrase:(optional) Input the passphrase for the private key.
- Enable Last Will and Testament:When enabled,Last Will and Testamentsignals the broker to publish the configured message to the configured topic when the gateway is disconnected from the broker. Subscribed clients can use this option when network outages occur.
- Last Will and Testament Topic:When the gateway is disconnected, this is the topic to which the broker publishes the Last-will message.
- Enable Retain:The gateway saves the last message published to the Last Will and Testament topic so that new subscribers receive the message when connected.
- QoS:Quality of Service. Defines the effort produced by the broker/client to ensure that a Last-will message is received. The broker sends messages at any QoS level.
- Message:The message that the broker publishes to the Last Will and Testament topic when the gateway is disconnected.
- Store and forward:Stores the data entering the application in a database on the gateway. This setting also functions as a buffer for data entering the store database at higher speeds than it is forwarding to the application. A maximum of 256 KB of data is fetched from the store database at each configured fetch interval. SelectStore and Forwardto enable theMaximum store size (bytes)andFetch Interval (ms)settings.
- SelectSave.
Provide Feedback