📝 Technical Guide

What Is MQTT? The IoT Messaging Protocol

23.05.2026  ·  6 min read

What is the MQTT protocol and how does the pub/sub model work? QoS levels, TLS security, and energy data transmission over MQTT in Argus EMS.

What Is MQTT? The IoT Messaging Protocol | Argus EMS

What Is MQTT?

MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol designed for IoT devices operating on low-bandwidth and unreliable networks. Developed by IBM in 1999, the protocol was published as an OASIS standard in 2014. It runs over TCP/IP, and its message size is minimal.

The MQTT Publish-Subscribe (Pub/Sub) Model

Unlike the traditional client-server model, MQTT operates through a broker (intermediary):

  • Publisher: The device or application that produces data. It tags the data with a topic and sends it to the broker.
  • Broker: Receives messages and delivers them to the relevant subscriber(s). Popular examples: Mosquitto, HiveMQ, EMQX.
  • Subscriber: Subscribes to the topics it is interested in; the broker delivers each new message as it arrives.

Thanks to this architecture, the publisher and the subscriber do not need to know one another; their connections are independent. This characteristic is especially valuable for field devices with intermittent internet connectivity.

QoS Levels

  • QoS 0 — At most once. Fast, but carries a risk of loss.
  • QoS 1 — At least once. Through an acknowledgment (ACK) mechanism, messages can be re-sent. Argus EMS uses this level.
  • QoS 2 — Exactly once. A four-way handshake; the most reliable but the slowest.

MQTT and Its Use in Energy Monitoring Systems

In industrial energy monitoring systems, MQTT is the most efficient way to move field data to a central server. In the Argus EMS architecture:

  • The Field Agent on the on-site PC converts data read from Modbus/M-Bus devices into MQTT messages
  • It sends them over a TLS-encrypted connection on port 8883 to the Mosquitto broker on the Linux server
  • The MQTT subscriber receives the messages and writes them to the PostgreSQL database
  • If the connection drops, the Field Agent holds the data in a SQLite queue and sends it in bulk once the connection is restored

MQTT TLS Security

In production systems, MQTT must always be encrypted with TLS:

  • Port 1883 (unencrypted) is kept open only to localhost
  • Port 8883 (TLS) is used for external connections
  • Certificate validation is enabled
  • For client authentication, a username/password or a client certificate is used

Retain and Last Will Messages

Retain: The broker stores the last message; a new subscriber immediately receives the most recent value. Ideal for publishing device status.
Last Will: If the connection is unexpectedly lost, the broker publishes this message. The Argus EMS Field Agent uses this method to notify the central server of a dropped connection.

Frequently Asked Questions

What is used as the MQTT broker?
The open-source Mosquitto is the most common choice; it is ideal for small and medium-scale systems. HiveMQ and EMQX offer enterprise features. Argus EMS has been tested with Mosquitto.
What is the difference between MQTT and HTTP?
HTTP operates on a request-response model; a new connection is opened for each piece of data. MQTT works over a persistent connection, with minimal overhead. On mobile or weak bandwidth, MQTT is far more efficient.
How are MQTT messages monitored?
You can monitor topics in real time using the mosquitto_sub command or the MQTT Explorer tool. The Argus EMS backend already listens to all topics and logs anomalies.
What happens when the Field Agent loses its connection?
Thanks to the combination of QoS-1 and the SQLite queue, no data is lost. The Field Agent writes to the queue; once the connection is established, it keeps re-sending until the broker acknowledges (ACK). It has buffering capacity for up to 30 days.

Put It Into Practice with Argus EMS

Request a demo and let our experts evaluate the implementation at your facility.

See Argus at Your Facility

Explore the system with your own data in a demo session.