Stand with Ukraine flag

MQTT GUIDE

4 min read

What Is an MQTT Broker?

Quick answer

An MQTT broker is the central server that sits between MQTT clients: it receives every published message and routes it to the clients subscribed to the matching topic. The broker manages connections, subscriptions, per-QoS delivery, session state, and authentication — so publishers and subscribers never talk to each other directly.

If MQTT is the language IoT devices speak, the broker is the switchboard they all call into. It is the one component every client connects to, and it is what makes MQTT's decoupled publish/subscribe model work.

What an MQTT broker does

Clients don't send messages to each other — they send them to topics on the broker. When a message is published, the broker finds every client subscribed to a matching topic and delivers a copy to each one. A single publish can fan out to many subscribers, and a subscriber can receive from many publishers, all without any of them knowing about the others.

PUBLISHERSSUBSCRIBERS Sensor A Sensor B App X BROKER match topicapply QoSauth + ACLsmanage session Dashboard Service Logger publish route one publish in → many deliveries out
The broker decouples publishers from subscribers and fans each message out

What the broker manages

Beyond routing, the broker owns the state and rules of the whole system:

Connections — accepting clients over TCP, TLS, and WebSocket, and keeping them alive with keep-alive.
Subscriptions & topic matching — tracking who is subscribed to what, including wildcard subscriptions.
Delivery guarantees — honoring each message's QoS level.
State retained messages, last will, and persistent sessions for offline clients.
Security authenticating clients and authorizing which topics each may use.

Types of MQTT brokers

Brokers come in a few flavors, and the right one depends on how much you want to run yourself:

You're here — TBMQ Open-source Free and self-hosted — you deploy and scale it. Ideal for prototyping, full control, and integrating into your own stack.
Commercial Enterprise builds that add clustering, management dashboards, advanced security, and SLA-backed support.
Cloud / MQTT-as-a-Service Fully managed offerings where the provider handles deployment, scaling, and uptime, so you run no infrastructure yourself.
Embedded Lightweight brokers that run on a gateway or inside an application for local, offline-first processing at the edge.

TBMQ is open-source, with a professional edition and a managed private-cloud option — so you can start self-hosted and move to managed hosting later without switching brokers.

What to look for in a broker

Brokers differ most in how far they scale and how they persist data. For production IoT, the questions that matter are: how many concurrent connections and how much throughput it sustains, whether it clusters horizontally, which MQTT versions it supports (such as 3.1.1 and 5.0), how it persists messages for offline clients, and what authentication and authorization it offers. For the long run, also weigh the strength of its community or commercial support and the total cost of running it.

The broker in TBMQ

TBMQ is an open-source MQTT broker built by the ThingsBoard team, supporting MQTT 3.1, 3.1.1, and 5.0 and engineered to scale to 100M+ concurrent connections on a single cluster by using Kafka as its internal backbone. The TBMQ broker guide covers what sets it apart and how its DEVICE and APPLICATION clients differ. To see how the pieces fit together, the architecture overview walks through the design, and getting started spins one up in minutes.

Frequently asked questions

Is an MQTT broker a server?

Yes. The broker is the central server in an MQTT deployment. Every client connects to it, and it is responsible for receiving published messages and forwarding them to the right subscribers.

What is the difference between an MQTT broker and an MQTT client?

A client is any device or application that publishes or subscribes; the broker is the single hub they all connect to. Clients never talk to each other directly — the broker routes every message between them.

Do I need a broker to use MQTT?

Yes. MQTT is a broker-centric publish/subscribe protocol, so a broker is required. There is no peer-to-peer mode; publishers and subscribers are decoupled through the broker.

What are examples of MQTT brokers?

There are many open-source and commercial brokers. TBMQ is an open-source MQTT broker built by ThingsBoard for very large-scale deployments.

How many devices can an MQTT broker handle?

It depends on the broker and its architecture. Lightweight single-node brokers handle thousands to hundreds of thousands of connections; clustered brokers like TBMQ are designed to scale to 100M+ concurrent connections.

Run it yourself

TBMQ is a free, open-source MQTT broker built to scale. Spin it up in minutes or try the live demo — no install required.