What is mqtt broker
Last updated: April 1, 2026
Key Facts
- MQTT stands for Message Queuing Telemetry Transport, a lightweight publish-subscribe protocol
- Brokers maintain a list of active subscriptions and route messages to matching subscribers
- Popular open-source MQTT brokers include Mosquitto, EMQ, and Apache ActiveMQ
- MQTT brokers typically operate on port 1883 (unencrypted) or 8883 (TLS-encrypted)
- Brokers can store messages for offline clients using the Quality of Service (QoS) feature
How MQTT Brokers Work
An MQTT broker acts as a central server in a publish-subscribe messaging architecture. When a client publishes a message to a specific topic, the broker receives it and immediately forwards it to all clients that have subscribed to that topic. This decoupling between publishers and subscribers eliminates the need for direct client-to-client connections.
Architecture and Components
The broker maintains several critical components: a subscription manager that tracks which clients are interested in which topics, a message router that directs incoming messages to appropriate subscribers, and a persistence layer that can store messages for clients that are temporarily offline. The broker communicates using the MQTT protocol, which uses a binary format for efficient transmission over low-bandwidth networks.
Key Features
- Topic-based routing: Messages are organized into hierarchical topics using forward slashes (e.g., home/kitchen/temperature)
- Quality of Service levels: QoS 0 (at most once), QoS 1 (at least once), and QoS 2 (exactly once)
- Last Will and Testament: Clients can specify messages to be sent if they disconnect unexpectedly
- Retained messages: The broker can store the last message on each topic for new subscribers
- Authentication and authorization: Username/password and access control for topics
Common MQTT Brokers
Popular options include Mosquitto (lightweight, open-source), HiveMQ (enterprise-grade), EMQ (horizontally scalable), and AWS IoT Core (cloud-based). Each broker varies in scalability, features, and deployment options. Open-source brokers suit small deployments and development, while commercial solutions provide enterprise features, clustering, and high availability.
Use Cases
MQTT brokers power IoT applications like smart home systems, industrial sensor networks, real-time data collection, and mobile push notifications. They're ideal for scenarios with many devices sending small amounts of data over unreliable networks, making them perfect for battery-powered IoT devices and applications requiring low latency.
Related Questions
What is the difference between MQTT and HTTP?
MQTT is a lightweight publish-subscribe protocol ideal for IoT devices, while HTTP is a request-response protocol used for web browsing. MQTT uses less bandwidth and battery power, making it better for constrained devices and real-time messaging.
How does MQTT QoS work?
MQTT Quality of Service levels control message delivery guarantees. QoS 0 offers no guarantee, QoS 1 ensures at least one delivery, and QoS 2 guarantees exactly one delivery. Higher QoS levels require more network overhead.
Can MQTT brokers scale to handle millions of devices?
Yes, enterprise MQTT brokers can scale to millions of connections through clustering, load balancing, and distributed architecture. Cloud-based brokers like AWS IoT Core and Azure IoT Hub handle massive scale automatically.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- Wikipedia - MQTTCC-BY-SA-4.0
- MQTT Official OrganizationOpen Source
- HiveMQ - MQTT Essentials GuideCC-BY-4.0