DeviceHub
ESLicense PortalRequest Demo
Home/Blog/IIoT Architecture

How to Connect Modbus TCP Devices to MQTT Brokers

OT-to-IT integration patterns with Modbus TCP to MQTT gateways: hierarchical topic design, QoS selection, TLS/mTLS security, and on-demand reads.

2026-11-12 · 7 min · IoTHost Engineering

Why Decouple OT and IT with MQTT

Modbus TCP is a synchronous polling protocol designed for LANs, whereas MQTT is a lightweight pub/sub standard built for distributed networks. Placing a gateway like DeviceHub in between polls meters locally and streams clean JSON payloads to brokers such as EMQX or Mosquitto.

JSON
{
  "topic": "planta/subestacion1/pm5560/telemetry",
  "payload": {
    "voltageAN": 220.42,
    "currentA": 142.60,
    "activePowerTotal": 91.45,
    "powerFactorTotal": 0.967,
    "frequency": 50.01
  }
}

MQTTS Security Best Practices

Whenever the broker lives outside the OT VLAN, enable MQTTS on port 8883 with Certificate Authority (CA) verification and dedicated credentials for each plant gateway.

Test this architecture today with DeviceHub

Deploy the official container in 2 minutes or request a 30-day Professional evaluation in the Customer Portal.