Skip to content

Connecting OPC UA Pub Sub agents via MindConnect MQTT broker


This guide explains the steps how to connect to OPC UA Pub/Sub via MindConnect MQTT.




To connect to OPC UA Pub Sub agents via MindConnect MQTT broker, follow these steps.

  1. Download the MindConnect MQTT Broker certificate

Login to Insights Hub environment and navigate to the "Asset Manager" application. In the "Connectivity" section, Select "Manage MQTT Certificates" and click "Broker Information". "MindConnect MQTT Broker Certificate" is available as shown in the image.

Manage MQTT certificates

  • Broker URL:{TCP Port}
  • Broker ports: use the port number as per the requirement.
Protocol Authentication TCP Port ALPN Protocol
MQTT Client Certificate 8883 N/A
MQTT Client Certificate 443 x-amzn-mqtt-ca

2.Create & Download the Agent credentials

User can authenticate the agent using either one of ways.

  • Download the Agent certificate and associated private key using the built-in CA certificate, for more information refer to obtain Auto-generated agent certificates.
    The below image is an example of downloaded certificate and private key.

Timeseries device test

dade1 is an example environment name.
OPCUATimeseriesDeviceTest is the certificate name.
dade1_OPCUATimeseriesDeviceTest is used as a clientId.


What is clientId?
To successfully connect, onboard, and communicate with the MQTT broker, each client needs to use a client id in the following format "<clientId> = <tenant>_<CertificateName>".

3.Install the Agent Credentials

Install certificate and private key in the agent. Installation depends on the software used in the agent. Refer to the software manual. Agent is ready to send Timeseries.


Example of MQTT Client Configuration:
MQTT client configuration

4.Ingest Timeseries or Events metadata

Ingest metadata over the metadata topics

  • c/<clientId>/o/opcua/v3/u/m/t
  • c/<clientId>/o/opcua/v3/u/m/e


  • Refer to the sample message for timeseries metadata Once the metadata is published, the corresponding owner asset is created on Insights Hub with core.opcuadatamodel type. Refer to the below image for example on TestOpcuaDevice1.
    Test OPCUA device
  • Datapoint asset is created under the owner asset with a type which is derived from core.opcuadatatype.
    Motor Pump
    OPCUA Datatpe

5.Send Timeseries or Events data

Ingest Timeseries/Events data over the data topics:

  • c/<clientId>/o/opcua/v3/u/d/t
  • c/<clientId>/o/opcua/v3/u/d/e

For more information on Timeseries, refer to sample message for timeseries data.

Last update: February 16, 2024

Except where otherwise noted, content on this site is licensed under the Development License Agreement.