Skip to main content

General

Embedded MQTT Broker

Configure and use the built-in MQTT broker on Proxus Edge Gateways for local device telemetry.

Every Proxus Edge Gateway includes an embedded MQTT broker. This eliminates the need for external broker infrastructure like Mosquitto or EMQX. For more about the edge architecture, see Stateless Edge Architecture.

What Does the MQTT Broker Do?

The embedded broker serves as a bidirectional data gateway between your devices and the Proxus platform:

📥 Ingress (Device → Gateway)

Devices on the local network publish telemetry data to the Gateway:

  1. Device connects to gateway-ip:1883 using its unique Device Token
  2. Device publishes JSON payload to the telemetry topic
  3. Gateway parses, validates, and routes data through the Data Flow Pipeline
Ingress: Device to Gateway
sensors

Device

PLC / IoT Sensor

hub

MQTT Broker

Proxus Gateway

route

Data Pipeline

Parse & Validate

📤 Egress (Gateway → Unified Namespace)

The Gateway automatically republishes data to ISA-95 compliant topics:

  1. Data is transformed into per-metric telemetry messages
  2. Device status and lastSeen timestamps are published
  3. Optional summary message aggregates all metrics
  4. External systems (SCADA, MES, Analytics) can subscribe to these topics
Egress: Gateway to UNS
route

Data Pipeline

Processed Data

hub

MQTT Broker

UNS Publisher

monitoring

UNS Consumers

SCADA / MES / Analytics

Key Benefits

For more about security aspects, see Security & Access Control.


Configuration

The MQTT broker is configured in Proxus-config.toml:

lightbulb
Full Reference

For a complete list of all available settings and environment variable overrides, see the Configuration Reference.

Basic Settings

[MQTTBroker]
MQTTBrokerPort = 1883
MasterToken = "your-master-token"
AllowAnonymous = false
SettingTypeDefaultDescription
MQTTBrokerPortint1883TCP port for MQTT connections
MasterTokenstring-Shared token for development access
AllowAnonymousboolfalseAllow unauthenticated connections

Unified Namespace Settings

[UNS]
# Payload format: "JSON" or "SparkplugB"
UNSPayloadFormat = "JSON"

# SparkplugB specific settings
UNSGroupId = "ProxusGroup"
UNSEdgeNodeId = "ProxusEdge_MachineName"

# Retain messages on MQTT broker
UNSRetainMessages = true
SettingTypeDefaultDescription
UNSPayloadFormatstringJSONPayload format: JSON or SparkplugB
UNSGroupIdstringProxusGroupSparkplugB group identifier
UNSEdgeNodeIdstringautoSparkplugB edge node identifier
UNSRetainMessagesbooltrueRetain last message per topic

Performance Optimizations

[UNS.Optimizations]
# Thin payload removes context object from per-metric telemetry
TelemetryThinPayload = true

# Include ISA-95 context in summary messages
SummaryIncludeContext = true

# Throttle intervals (milliseconds, 0 = no throttling)
SummaryIntervalMs = 5000
LastSeenIntervalMs = 5000

# Publish status only when it changes
StatusOnChangeOnly = true

# Publish summary only when values change (hash-based)
SummaryOnlyOnChange = false
SettingTypeDefaultDescription
TelemetryThinPayloadbooltrueOmit context from per-metric messages
SummaryIncludeContextbooltrueInclude ISA-95 context in summary
SummaryIntervalMsint5000Summary publish throttle (ms)
LastSeenIntervalMsint5000LastSeen publish throttle (ms)
StatusOnChangeOnlybooltrueOnly publish status on change

Authentication Methods

Each device configured in Proxus receives a unique Device Token. Use this token as the MQTT username when connecting. For more about device configuration, see Add Device.

Host: gateway-ip:1883
Username: device-token
Password: (not required)

2. Master Token

For development or testing, you can use the MasterToken from configuration.

3. Anonymous

If AllowAnonymous = true, devices can connect without credentials. Use only in isolated networks. For more about authentication security, see Security & Access Control.


Publishing Telemetry

Devices publish JSON payloads to the telemetry topic:

{
"Temperature": 72.5,
"Pressure": 14.7,
"Status": "Running"
}

The Gateway automatically:

  1. Parses the JSON payload
  2. Associates it with the authenticated device
  3. Routes it through the Data Flow Pipeline
  4. Publishes to Unified Namespace topics (if enabled)

Unified Namespace Publishing

The broker publishes data to ISA-95 compliant topics with category separation. For more information about the Unified Namespace concept, see Unified Namespace.

Telemetry Topics

Per-metric values and device summary:

v1/{enterprise}/{site}/{area}/{processCell}/{equipmentModule}/{deviceName}/telemetry/{metric}
v1/{enterprise}/{site}/{area}/{processCell}/{equipmentModule}/{deviceName}/telemetry/_summary

State Topics

Device status and last seen timestamps (retained):

v1/{enterprise}/{site}/{area}/{processCell}/{equipmentModule}/{deviceName}/state/_status
v1/{enterprise}/{site}/{area}/{processCell}/{equipmentModule}/{deviceName}/state/_lastSeen

SparkplugB Support

If UNSPayloadFormat = "SparkplugB", the broker publishes using SparkplugB encoding:

spBv1.0/{GroupId}/DDATA/{EdgeNodeId}/{DeviceId}

Health Monitoring

The MQTT broker monitors connected devices and tracks:

  • Last Seen: Timestamp of last message received
  • Connection Status: Online/Offline
  • Message Rate: Messages per minute

Devices that stop sending data are automatically marked as offline. For more about monitoring and system health, see System Logs.


Next Steps