MQTT Messages

The MQTT topics Collection publishes Devices, Observations, Statistics, and Connection Status to.
MTConnect Server Docs Menu

Messages Profiles publish the data of their Devices to an MQTT broker as JSON. Messages are retained, so a client that subscribes receives the latest message on each topic right away, and then each new one as it's collected.

Topics

Each Profile publishes under its Base Topic (trakhound/mtconnect/collection when left blank):

TopicContents
{baseTopic}/devices/{deviceUuid}/deviceThe Device model
{baseTopic}/devices/{deviceUuid}/component/{componentId}Each Component
{baseTopic}/devices/{deviceUuid}/data_item/{dataItemId}Each DataItem
{baseTopic}/observations/{deviceUuid}/{dataItemId}The Observations of each DataItem that matches the Profile's Filter
{baseTopic}/statistics/{deviceUuid}/deviceObservation statistics of the Device
{baseTopic}/statistics/{deviceUuid}/data_item/{dataItemId}Observation statistics of each DataItem
{baseTopic}/connections/{deviceId}/statusThe Device's Connection Status

Subscribe

With the default Base Topic:

SubscriptionReceives
trakhound/mtconnect/collection/observations/#Every Observation of every Device
trakhound/mtconnect/collection/observations/{deviceUuid}/#Every Observation of one Device
trakhound/mtconnect/collection/observations/+/{dataItemId}One DataItem ID on every Device
trakhound/mtconnect/collection/connections/#The Connection Status of every Device

For example, with the Mosquitto command line client:

mosquitto_sub -h localhost -t "trakhound/mtconnect/collection/observations/#" -v

Observation Messages

An Observation message is an Observation Collection: the DataItem's ID and its values, in one of three lists depending on its Category (the same format as the REST API):

{
  "dataItemId": "execution",
  "eventValue": [
    { "result": "ACTIVE", "timestamp": "2026-10-08T14:35:00.0000000Z", "sequence": 102400 }
  ]
}
ListUsed For
sampleValueNumeric SAMPLEs, with a numeric result
eventValueEVENTs, with a text result
conditionCONDITIONs, with a level, nativeCode, and the alarm message as result

Several Profiles on One Broker

Profiles with different Base Topics can publish to the same MQTT broker. For example, publish Conditions under plant1/alarms with one Profile (a Filter that allows category=CONDITION), and all other Observations under plant1/data with another.

The REST API's WebSocket stream is built on the Messages published with the default Base Topic, through the default Router.