Add and Configure an MQTT Broker connection
- Last UpdatedMay 27, 2025
- 3 minute read
Add an MQTT broker connection
In the Operations Control Management Console (OCMC), expand Operations Integration Server Manager > Default Group > Local > Operations Integration Supervisory Servers > Standards-MQTT.
Right-click the Configuration node in the hierarchy and select Add MQTT_BROKER Connection from the shortcut menu.
A new connection is created in the hierarchy tree, named "New_MQTT_BROKER_000" by default. Rename it, if desired. Multiple MQTT Broker connections can be added to one IOT - MQTT instance.
Configure the connection to the MQTT Broker
-
In the Broker Address field, enter the IP address of the MQTT Broker or host name. The number of characters cannot exceed 255 and this field cannot be blank.
The MQTT Communication Driver also supports IPv6 network connectivity with the MQTT Broker. The MQTT Broker can be configured with the link-local IPv6 address of the machine on which the MQTT Broker runs.
-
The default Port Number 1883 provided is the network port parameter used by default by MQTT brokers for unsecure connections.
-
The Subscriber Client ID is used to uniquely identify the subscriber connection to the broker. The specified string must be unique across all client IDs connected to the same broker. If it is blank, the MQTT Communication Driver will automatically generate a unique string.
-
The Persist Session ensures that the MQTT broker saves all the information that is relevant for the client on the broker. When persistence is enabled, the broker will store any QoS1 or Qos2 messages that have not been retrieved. In the traditional MQTT standard, the setting is referred to as the “Clean” Session. The MQTT Sparkplug standard refers to it as “Persist Session”. You enable Persistence when you want the broker to store relevant information.
-
Select the Persist Session check box if you are a subscriber client in the MQTT network and need the broker to store QoS1 and QoS2 messages that have not been retrieved.
-
Clear the Persist Session check box if you are a subscriber client in the MQTT network and do not need to get messages that you missed while you were offline.
IMPORTANT: Persistence only applies to messages that have been sent with Quality of Service 1 or 2.
-
-
If you select the Enable checkbox inside the Subscribe to Sparkplug Infrastructure section, the subscribed data can originate from both Sparkplug and non-Sparkplug infrastructure, and the Sparkplug STATE message will be subscribed. If you do not select the Enable checkbox, the subscribed data must be in JSON and/or plain text format and the Sparkplug STATE message will not be subscribed. When the Enable checkbox is selected, the following fields will be enabled.
-
When the Primary Application check box is checked, the broker hierarchy acts as a Primary Host and sends an Online message to the broker on the 'STATE/<Scada Host Id>' topic on the broker. This topic is used to direct Sparkplug publishers to publish the NBIRTH/DBIRTH messages to the broker.
-
The SCADA Host ID is the name by which this application is known in the network so that all Edge Gateway (EON) nodes can monitor its connectivity to the broker as described above. Refer to the Sparkplug specification for information on the role of the SCADA Host ID.
IMPORTANT: In an MQTT Sparkplug-based network there should only be a single node designated as the Primary Application.
-
Specify the Listener Client ID to uniquely identify a background service to connect to the MQTT broker. The background service is used to monitor birth and death messages sent/received by the MQTT broker. You can change the Listener Client ID to fit your naming nomenclature, but you must ensure that it is unique across all MQTT connections to the same broker.
-
-
Click the Validate Address and Port button to verify that the MQTT Broker can be accessed. The status of the test is displayed in a dialog. The initial status is "Connecting to host...."
-
If the connection to the MQTT Broker is successful, the final status is "Connection to host successful."
-
If the MQTT Broker cannot be accessed, the final status is "Unable to connect to host." Check that the network address and port number are correct.
-
For more information on how to configure MQTT Broker Connection, refer to the AVEVA Communication Drivers Pack – Standards- MQTT Driver User Guide or MQTT Drivers Help.