Blog

MQTT Fundamentals

Core MQTT concepts explained: brokers, topics, QoS, sessions and MQTT 5 features, with hands-on examples on the free public broker broker.connectmq.com.

Who Invented MQTT? The History from Oil Pipelines to IoT

MQTT was invented in 1999 by Andy Stanford-Clark of IBM and Arlen Nipper of Arcom to monitor oil pipelines over satellite. Follow its path to open source, OASIS, ISO and today's managed cloud brokers.

7 min read

MQTT Maximum Message Size: Limits and Large Payload Strategies

MQTT can technically carry a 256 MB packet, but brokers, client libraries and devices impose far lower limits. Learn where the real limits are, what happens when you exceed them, and how to send large payloads.

7 min read

Why Your MQTT Client Keeps Disconnecting (and How to Fix It)

Reconnect loops are one of the most common MQTT problems. Learn the five usual causes, from duplicate client IDs to keep alive timeouts and oversized packets, and follow a diagnosis flow that pinpoints yours.

8 min read

MQTT vs CoAP: TCP Pub/Sub vs UDP Request/Response

MQTT and CoAP both target constrained IoT devices but take opposite approaches: brokered pub/sub over TCP versus RESTful request/response over UDP. Here is how they compare and when to use each.

8 min read

40 MQTT Interview Questions and Answers for IoT Developers

Forty MQTT interview questions with concise answers covering fundamentals, QoS, sessions, retained messages, Last Will, MQTT 5 and security, plus ways to practice each concept on broker.connectmq.com.

8 min read

MQTT Broker vs Message Queue: What's the Difference?

An MQTT broker and a message queue both sit between producers and consumers, but they deliver messages in fundamentally different ways. Learn the semantics of each and when a cloud MQTT broker is the right building block.

7 min read

MQTT Bandwidth Usage: Calculating Overhead per Message

How many bytes does an MQTT message really cost? Work through connect, keep alive and publish overhead at each QoS level, add TCP and TLS, and build a monthly data estimate for cellular IoT devices.

8 min read

MQTT 3.1.1 vs 5.0: What Changed and Should You Upgrade?

A practical MQTT 3.1.1 vs 5.0 comparison covering protocol behavior changes, client library support and a step-by-step migration checklist for upgrading a mixed fleet gradually.

8 min read

MQTT Last Will and Testament (LWT): Detecting Offline Devices

Last Will and Testament lets the broker announce that a client vanished without saying goodbye. Learn the will fields, the exact trigger rules and how to test LWT by killing a client on a live broker.

7 min read

MQTT Message Ordering Guarantees Explained

MQTT keeps messages in order, but only within narrow rules. Learn exactly what the spec guarantees, the real-world situations that reorder messages, and how sequence numbers make your consumers robust.

7 min read

MQTT CONNACK Return Codes 0-5 Explained (MQTT 3.1.1)

MQTT 3.1.1 brokers answer every CONNECT with a CONNACK return code from 0 to 5. Learn what each one means, how it looks in Mosquitto, Paho and MQTT.js, and the fastest fix for each refusal.

7 min read

Is MQTT TCP or UDP? The MQTT Transport Layer Explained

MQTT runs over TCP, either directly, inside TLS, or inside WebSocket. Learn why the protocol depends on an ordered, reliable stream, where MQTT-SN and QUIC fit, and which ports to open for a ConnectMQ broker.

7 min read

MQTT-SN Explained: MQTT for Sensor Networks

MQTT-SN adapts MQTT for battery-powered sensors on UDP, Zigbee and other non-TCP networks. Learn topic IDs, sleeping clients and gateways, and how to forward MQTT-SN traffic into a standard MQTT broker.

8 min read

MQTT Message Expiry Interval: Stopping Stale Commands

MQTT 5 lets a publisher say how long a message stays valid. Learn how the message expiry interval works with persistent sessions and retained messages, and how to stop late devices from executing stale commands.

7 min read

MQTT Maximum QoS and Subscription Downgrades

The QoS you ask for is not always the QoS you get. Learn how effective QoS is calculated, how brokers advertise a maximum QoS and grant lower subscription levels, and how to check what your connection really uses.

7 min read

MQTT Payload Formats: JSON vs Protobuf vs CBOR

MQTT does not care what is inside a payload, so the choice is yours. Compare JSON, Protobuf and CBOR on size, schemas, debugging and tooling, using byte counts for the same sensor reading.

7 min read

MQTT Use Cases by Industry: 15 Real-World Examples

Fifteen practical MQTT use cases across manufacturing, energy, automotive, smart buildings, agriculture and logistics, each with a sample topic design, the MQTT features it relies on and the broker plan that fits its scale.

7 min read

Your private MQTT broker is a few clicks away

Create an account, get your broker credentials and connect your first device — no servers to install, patch or scale.