What is MQTT?
MQTT (Message Queuing Telemetry Transport) is a lightweight publish-subscribe messaging protocol built on top of TCP/IP. It is an ISO and OASIS standard (ISO/IEC 20922) and the dominant communication protocol for industrial IoT, machine-to-machine telemetry, and cloud-connected sensor networks. According to the Eclipse Foundation’s 2024 IoT and Embedded Developer Survey, MQTT is the preferred IIoT communication protocol with 56% adoption across the industry.
The protocol was created in 1999 by Andy Stanford-Clark at IBM and Arlen Nipper at Eurotech. Its first application was monitoring crude oil pipelines via satellite link on the SCADA system used by Conoco Phillips. The requirement at the time was a protocol that consumed minimal bandwidth, used little power, and worked reliably over expensive satellite connections with high latency. Those same properties make MQTT the right choice for industrial cellular deployments today.
How MQTT Works
MQTT uses a publish-subscribe model, which is fundamentally different from the request-response model used by HTTP. There are three roles in an MQTT system: publishers, subscribers, and a broker.
Publisher – a device or application that sends data. It publishes a message to a named topic on the broker. It does not know, or care, how many subscribers are listening.
Broker – a server that receives all messages from publishers and routes them to the correct subscribers based on topic. Common brokers include Mosquitto (open source), AWS IoT Core, Azure IoT Hub, and HiveMQ.
Subscriber – a device or application that registers interest in a topic. Whenever the broker receives a message on that topic, it delivers it immediately to all subscribers.
A practical example: a temperature sensor on a water treatment plant publishes a reading every 30 seconds to the topic plant/site-a/tank-1/temp. The SCADA server in the control room subscribes to that topic. The broker handles delivery. The sensor never connects directly to the SCADA server. If the network drops temporarily, messages queue at the broker depending on the Quality of Service level selected.
Quality of Service Levels
MQTT defines three QoS levels that control message delivery guarantees.
| QoS Level | Behaviour | Typical Use |
|---|---|---|
| QoS 0 – At most once | Fire and forget. No acknowledgement. Message may be lost if the connection drops. | High-frequency sensor readings where occasional loss is acceptable |
| QoS 1 – At least once | Message is acknowledged. May be delivered more than once if the acknowledgement is lost. | Alarms, status updates, most industrial telemetry |
| QoS 2 – Exactly once | Four-part handshake ensures the message arrives exactly once. | Billing data, command execution, financial transactions |
Why MQTT Outperforms HTTP for IoT Telemetry
HTTP is a request-response protocol. Every data point requires a full request and response cycle, including headers, connection setup, and teardown. An HTTP request can add 2 KB of overhead to a message that contains only 10 bytes of sensor data. MQTT headers are a fixed 2 bytes. For a device sending a reading every 10 seconds over a cellular link with a metered SIM, that difference adds up significantly over time.
MQTT also maintains a persistent connection between device and broker. This reduces reconnection overhead and allows the broker to push commands back to a device without polling. HTTP has no equivalent push mechanism without long-polling or WebSocket extensions.
Why MQTT is the Standard for Industrial IoT
Industrial IoT deployments share common constraints: remote locations, limited bandwidth, variable cellular signal, legacy serial devices, and a requirement that no data is lost. MQTT was built for exactly these conditions.
Key reasons MQTT dominates industrial deployments:
- Low bandwidth consumption. Small fixed headers and compact payloads suit metered cellular SIM cards and narrow-band connections.
- Persistent sessions. If a device loses connectivity, the broker stores messages until the device reconnects (subject to QoS level). No data is silently discarded.
- Decoupled architecture. Publishers and subscribers have no direct connection. Adding a new monitoring application means subscribing to an existing topic, with no changes to the field device.
- Bidirectional communication. A device can publish sensor data and simultaneously subscribe to a control topic, receiving commands from a cloud platform or SCADA system.
- TLS encryption support. MQTT over TLS is the standard for secure cloud connectivity, supported by all major cloud IoT platforms.
- Wide platform support. AWS IoT Core, Azure IoT Hub, Google Cloud IoT, and HiveMQ all use MQTT as their primary device connection protocol.
How Teltonika Routers Implement MQTT
Every Teltonika router and gateway running RutOS includes MQTT support as a standard feature. There are no licence fees or separate modules to purchase. The implementation is built on the open-source Mosquitto broker, which is the most widely deployed MQTT broker in production IoT systems.
A Teltonika router running RutOS can operate in three distinct MQTT roles simultaneously.
| Role | What it does |
|---|---|
| MQTT Broker | The router hosts a local Mosquitto broker. Devices on the LAN publish and subscribe through the router. The local broker can also bridge all traffic to a remote cloud broker, acting as a concentrator for multiple local devices. |
| MQTT Publisher | The router publishes its own system telemetry to a broker. Topics include cellular signal strength, uptime, WAN IP, data usage, and GPS coordinates (on models with GNSS). This data can go to the local broker or directly to a cloud platform. |
| MQTT Gateway (Modbus) | The router polls connected Modbus devices and translates the responses into JSON payloads published to an MQTT broker. This bridges legacy industrial devices to cloud platforms without any code running on the device itself. |
The Data to Server Function
RutOS includes a Data to Server service that handles the outbound publishing pipeline. This service collects data from multiple local sources – Modbus readings, I/O states, Bluetooth scanner results, GPS position, and router system metrics – and formats them as JSON or custom text payloads before publishing to a configured MQTT broker. The destination can be the router’s own local broker, AWS IoT Core, Azure IoT Hub, or any custom MQTT endpoint.
Configuration is done through the WebUI with no command-line access required. Teltonika also provides ready-made configuration guides for connecting to AWS IoT, Azure IoT Hub, and other major platforms via the Teltonika wiki.
Why Routers Without Serial Ports Still Support MQTT
A common assumption is that MQTT only matters for routers with RS232 or RS485 ports, because those ports are used to connect serial industrial devices. This is not the case. MQTT support in RutOS is independent of the physical interfaces on the router.
A router with Ethernet ports only, such as the RUT200 or RUTX10, supports MQTT in the following ways:
- Router telemetry publishing. Every RutOS device can publish its own signal metrics, uptime, WAN status, and data usage to any MQTT broker. This is useful for network operations monitoring without any attached sensors.
- Local MQTT broker for LAN devices. Any sensor, PLC, or edge device on the router’s LAN that speaks MQTT can publish to the router’s built-in Mosquitto broker. The router then bridges those messages to a cloud broker over the cellular WAN. This turns the router into a local MQTT concentrator for an entire site.
- Modbus TCP gateway to MQTT. If a Modbus TCP device is connected via Ethernet, the router can poll it as a Modbus TCP master and forward the data via MQTT. Modbus TCP is the IP-based variant of the Modbus protocol and requires no serial port.
Routers that additionally have RS232 or RS485 ports, such as the RUT906, RUT956, TRB142, and TRB145, extend this further. They connect directly to legacy Modbus RTU devices over serial and translate those readings to MQTT in the same pipeline. The Modbus RTU serial gateway function converts RS485 and RS232-connected slave devices into Modbus TCP internally, making their data available to the MQTT gateway in the same way as Ethernet-connected devices.
Connecting Teltonika Routers to Cloud Platforms via MQTT
Teltonika routers connect directly to major cloud IoT platforms using MQTT with TLS. No intermediary server is required. The router handles certificate-based authentication and encrypted transport to the cloud endpoint.
Azure IoT Hub
Google Cloud IoT
HiveMQ
Flespi
Mosquitto (self-hosted)
Ignition SCADA
Node-RED
For AWS IoT Core, the router is configured as a thing with an X.509 certificate and private key. Data published via MQTT appears in the AWS IoT rules engine, where it can be routed to DynamoDB, S3, Lambda functions, or Grafana dashboards. Setup is documented in full on the Teltonika wiki.
Azure IoT Hub uses a similar certificate-based approach. The router acts as an IoT device registered in the hub. Data published over MQTT is received by Azure IoT Hub and can be routed to Azure Stream Analytics, Azure Time Series Insights, or Power BI for dashboarding.
For deployments using a fixed IP SIM card, the router can also connect to a self-hosted MQTT broker on a private server, using a static address for the broker endpoint. This suits organisations that want to keep data on-premises rather than in a public cloud. See our fixed IP SIM cards for details on the SIM connectivity required for this architecture.
MQTT Use Cases on Teltonika Routers
Remote Substation and Utility Monitoring
Electricity substations, water pumping stations, and gas pressure reduction stations all contain instrumentation that generates telemetry continuously. A Teltonika router with RS485 reads Modbus RTU registers from meters, pressure sensors, and flow monitors, then publishes the data to an MQTT broker connected to a SCADA system. Operators see live readings from every site on one dashboard. Alerts publish to a separate topic the moment a reading exceeds a threshold.
EV Charge Point Monitoring
OCPP-based charge point management systems often use MQTT for the connection between the charger and the cloud backend. A Teltonika router provides the cellular backhaul for charge points at sites without fixed broadband. The router’s dual SIM support and automatic failover ensure the MQTT connection stays up even if one network drops.
Fleet and Asset Telemetry
Vehicles and mobile assets publish GPS position, engine data, and driver behaviour scores to an MQTT broker via the cellular-connected router. The broker routes position data to a fleet management platform and engine data to a maintenance system simultaneously, with each system subscribing only to the topics it needs. No data is duplicated and no changes are needed at the vehicle if a new subscriber is added.
Industrial Machine Monitoring
Manufacturing plant equipment – CNC machines, compressors, conveyors – exposes operational data via Modbus TCP or Modbus RTU. A Teltonika gateway reads those registers and publishes them via MQTT to an on-premise broker connected to a historian database. Maintenance teams subscribe to machine health topics and receive alerts when vibration, temperature, or cycle counts exceed limits.
Environmental and Agricultural Monitoring
Remote weather stations, soil sensors, and water quality instruments publish readings via MQTT at low frequency. The lightweight protocol suits battery-powered devices on narrow cellular connections. QoS 1 ensures readings are delivered even if the cellular connection is interrupted during a reading cycle.
Building Management Systems
BMS controllers for HVAC, lighting, and access control often support MQTT as an output protocol alongside BACnet and Modbus. A Teltonika router acts as the broker and cellular gateway in a single unit, collecting data from BMS sensors across a site and forwarding it to a cloud-based building analytics platform.
Teltonika Devices That Support MQTT
All Teltonika devices running RutOS support MQTT as standard. The table below covers the full current range, all of which are available from routerstore.com. Call us on 0300 124 6181 to discuss which device best fits your MQTT architecture.
All models support: MQTT broker, MQTT publisher (router telemetry), and Modbus TCP to MQTT gateway. Models with RS232 or RS485 additionally support Modbus RTU serial to MQTT.
| Series | Model | Key interface notes |
|---|---|---|
| RUT SERIES – Entry and Mid-Range Industrial Routers | ||
| RUT | RUT140 | 2x Ethernet, Wi-Fi, no serial, DIN rail |
| RUT | RUT142 | 2x Ethernet, Wi-Fi, RS232, DIN rail |
| RUT | RUT200 | 4G Cat 4, 1x WAN + 1x LAN Ethernet, Wi-Fi, single SIM |
| RUT | RUT202 | 4G Cat 4, dual SIM, compact form factor |
| RUT | RUT206 | 4G Cat 4, RS232 and RS485, PoE |
| RUT | RUT241 | 4G Cat 4, eSIM, TPM security chip |
| RUT | RUT260 | 4G Cat 6, digital I/O, WAN failover |
| RUT | RUT271 | 5G RedCap, Wi-Fi 4, WAN failover |
| RUT | RUT301 | 5x Ethernet, no cellular, USB, industrial design |
| RUT | RUT361 | 4G Cat 6, Wi-Fi, WAN failover |
| RUT | RUT901 | 4G Cat 4, dual SIM, 4x Ethernet |
| RUT | RUT906 | 4G Cat 4, RS232 and RS485, I/O, MQTT serial gateway |
| RUT | RUT951 | 4G Cat 4, dual SIM, 4x Ethernet |
| RUT | RUT951 PoE+ | 4G Cat 4, PoE+, dual SIM and eSIM |
| RUT | RUT956 | 4G Cat 4, RS232, RS485, I/O, Wi-Fi, MQTT serial gateway |
| RUT | RUT976 | 5G RedCap, dual SIM, RS232, RS485, I/O |
| RUT | RUT981 | Global 4G, dual SIM and eSIM, 4x Ethernet |
| RUT | RUT986 | Global LTE, dual SIM and eSIM, multiple interfaces |
| RUTX SERIES – Higher Performance Industrial Routers | ||
| RUTX | RUTX08 | 4x Gigabit Ethernet, no cellular, multiple VPNs |
| RUTX | RUTX09 | 4G Cat 6, dual SIM, 4x Gigabit Ethernet |
| RUTX | RUTX10 | 4x Gigabit Ethernet, dual-band Wi-Fi, BLE, no cellular |
| RUTX | RUTX11 | 4G Cat 6, dual SIM, 4x Gigabit Ethernet, Wi-Fi 5 |
| RUTX | RUTX12 | Dual 4G Cat 6 modems, load balancing, 5x Gigabit Ethernet |
| RUTX | RUTX14 | 4G Cat 12, dual SIM, 5x Gigabit Ethernet |
| RUTX | RUTX50 | 5G, 4G Cat 20, 5x Gigabit Ethernet, dual-band Wi-Fi |
| RUTX | RUTXR1 | SFP port, 5x Gigabit Ethernet, console port, dual PSU |
| RUTM SERIES – High-End and 5G Industrial Routers | ||
| RUTM | RUTM08 | 4G, 4x Gigabit Ethernet, multiple VPNs |
| RUTM | RUTM09 | 4G Cat 6, dual SIM, GNSS |
| RUTM | RUTM10 | 4G, 4x Gigabit Ethernet, dual-band Wi-Fi, multiple VPNs |
| RUTM | RUTM11 | 4G Cat 6, dual SIM, dual-band Wi-Fi |
| RUTM | RUTM30 | 5G Cat 19, dual SIM and eSIM, Wi-Fi 5 |
| RUTM | RUTM31 | 5G Cat 12, dual SIM, Wi-Fi 5 |
| RUTM | RUTM50 | 5G Cat 19, FCC and Giteki certified, 5x Gigabit Ethernet |
| RUTM | RUTM51 | 5G Cat 12, 5x Gigabit Ethernet, dual-band Wi-Fi |
| RUTM | RUTM52 | Dual 5G Cat 20, dual SIM and eSIM, load balancing |
| RUTM | RUTM54 | 5G Cat 19, dual SIM and eSIM, Telit modem |
| RUTM | RUTM55 | 5G Cat 19, RS232 and RS485, eSIM, MQTT serial gateway |
| RUTM | RUTM56 | Dual modem 5G + 4G, dual SIM and eSIM, MQTT serial gateway |
| RUTM | RUTM59 | 5G Cat 19, up to 3.4 Gbps, dual SIM |
| RUTC SERIES – Edge Computing Routers with Docker | ||
| RUTC | RUTC40 | Global 4G Cat 4, Wi-Fi 6, Docker, dual SIM and eSIM, 5x Gigabit Ethernet |
| RUTC | RUTC41 | Regional 4G Cat 4, Wi-Fi 6, Docker, dual SIM and eSIM, 5x Gigabit Ethernet |
| RUTC | RUTC42 | Dual modem 4G, Wi-Fi 6, Docker, 5x Gigabit Ethernet |
| RUTC | RUTC50 | 5G, Wi-Fi 6, Docker, 5x Gigabit Ethernet |
| TRB SERIES – Compact IoT Gateways | ||
| TRB | TRB140 | 4G Cat 4, 1x Gigabit Ethernet, compact, DIN rail |
| TRB | TRB141 | 4G Cat 1, Modbus, multiple I/O |
| TRB | TRB142 | 4G Cat 1, RS232, Modbus, MQTT serial gateway |
| TRB | TRB143 | 4G Cat 4, M-Bus interface, 1x Gigabit Ethernet |
| TRB | TRB145 | 4G Cat 1, RS485, Modbus, MQTT serial gateway |
| TRB | TRB160 | 4G Cat 6, compact, USB-C |
| TRB | TRB246 | 4G Cat 4, dual SIM, I/O, RS232 and RS485 |
| TRB | TRB247 | 4G Cat 1 bis, dual SIM, FCC certified |
| TRB | TRB256 | Cat M1 and NB1, 450 MHz support, RS232, RS485 |
| TRB | TRB501 | 5G, 4G Cat 19, 2.5 Gbps Ethernet |
| OTHER TELTONIKA DEVICES | ||
| OTD | OTD140 | 4G Cat 4, IP55, PoE in/out, outdoor enclosure |
| OTD | OTD500 | 5G, 4G Cat 19, IP55, eSIM, outdoor enclosure |
| DAP | DAP140 | Wi-Fi mesh, passive PoE, 2x RJ45 |
| DAP | DAP142 | Wi-Fi mesh, passive PoE, RS232 and RJ45 |
| DAP | DAP145 | Wi-Fi and RS485 bridging, cloud-ready |
| NTP | NTP001 | Stratum-1 NTP server, RS232 and RS485 |
Frequently Asked Questions
Do I need to install anything to use MQTT on a Teltonika router?
No. The Mosquitto MQTT broker and publisher are included in RutOS and enabled through the WebUI. On some older firmware versions, MQTT is available as a package installable from the System Package Manager, but on current firmware it is present by default. No command-line access or external software is required to configure the broker, publisher, or Modbus gateway functions.
Can a Teltonika router connect directly to AWS IoT Core or Azure IoT Hub?
Yes. Teltonika routers connect to AWS IoT Core and Azure IoT Hub over MQTT with TLS using X.509 certificate authentication. Teltonika provides step-by-step configuration guides on their wiki for both platforms. The router handles certificate storage and the TLS handshake natively. No server between the router and the cloud platform is required.
What SIM card do I need for MQTT over cellular?
For most MQTT cloud connectivity, a standard data SIM with internet access is sufficient. The router initiates the outbound MQTT connection to the broker, so no inbound ports are required. However, if your MQTT broker is hosted on a private server and you need a consistent endpoint address, a fixed IP SIM card provides a static IP on the router’s WAN interface, which the broker can identify. For setups using major cloud platforms such as AWS or Azure, a standard data SIM works fine as the cloud endpoint address never changes.
What is the difference between the router acting as an MQTT broker versus an MQTT publisher?
As a broker, the router hosts the Mosquitto service and other devices on the network publish and subscribe through it. The router is the central message routing point. As a publisher, the router itself sends data – its own signal strength, uptime, and connected device information – to a separate broker (either its own local broker or a cloud broker). In most deployments the router acts as both: hosting the local broker for site devices, and publishing its own telemetry to that broker or directly to the cloud.
Can I use MQTT to send commands back to a Teltonika router or connected device?
Yes. MQTT is bidirectional. A Teltonika router subscribed to a command topic can receive JSON payloads that trigger actions – rebooting the router, switching SIM, or writing a Modbus register value to a connected device. The Modbus MQTT Gateway function handles the translation of incoming MQTT JSON payloads into Modbus write commands to RS485 or Ethernet-connected devices. This enables remote actuation from a cloud platform with no direct IP access to the field device.
Does Teltonika RMS use MQTT?
Yes. The Teltonika Remote Management System (RMS) uses an encrypted MQTT tunnel with TLS and certificate-based authentication for all device-to-platform communication. This is why RMS works through NAT and firewalls without port forwarding – the device initiates the outbound MQTT connection. RMS does not conflict with your own MQTT configuration on the router.
Related Products and Further Reading
For RS485 Modbus RTU to MQTT deployments, the Teltonika TRB series IoT gateways are the compact choice. For higher bandwidth sites needing both MQTT and VPN, the Teltonika 4G router range covers RUT and RUTX series. 5G sites can deploy the Teltonika 5G router range for MQTT over high-throughput cellular. For RUTC series deployments requiring Docker-hosted MQTT brokers or custom processing pipelines, see our pages on the RUTC40 and RUTC41. For SIM connectivity, see the IoT SIM connectivity hub.