ConfigsApr 13, 2026·3 min read

EMQX — Scalable MQTT Broker for IoT and Connected Devices

EMQX is the most scalable open-source MQTT message broker. It handles 100 million+ concurrent connections with millisecond latency, powering IoT platforms, connected vehicles, industrial automation, and real-time messaging for smart devices.

TL;DR
EMQX is a high-performance open-source MQTT broker that handles massive concurrent connections for IoT platforms.
§01

What it is

EMQX is an open-source MQTT message broker designed for large-scale IoT deployments. It implements MQTT 5.0 and 3.1.1 protocols and is built on the Erlang/OTP platform, which gives it strong concurrency and fault-tolerance characteristics. EMQX powers IoT platforms, connected vehicles, industrial automation, and smart city infrastructure.

The broker targets IoT architects, embedded engineers, and backend teams building systems that need reliable pub/sub messaging at scale. If your application involves thousands to millions of devices publishing telemetry, EMQX is built for that workload.

§02

How it saves time or tokens

EMQX eliminates the need to build custom message routing, device authentication, and connection management for IoT. Instead of stitching together a message queue, a connection pool, and an auth layer, you get a single binary that handles all three. Its rule engine processes and routes messages without writing custom code, and built-in integrations push data to databases and cloud services directly.

§03

How to use

  1. Run EMQX with Docker:
docker run -d --name emqx \
  -p 1883:1883 -p 8083:8083 \
  -p 8084:8084 -p 8883:8883 \
  -p 18083:18083 \
  emqx/emqx:latest
  1. Access the dashboard at http://localhost:18083 with default credentials (admin / public).
  1. Connect an MQTT client to port 1883 and start publishing messages.
  1. Use the rule engine in the dashboard to route messages to databases, webhooks, or cloud services.
§04

Example

import paho.mqtt.client as mqtt

def on_connect(client, userdata, flags, rc):
    print(f'Connected with result code {rc}')
    client.subscribe('sensors/temperature')

def on_message(client, userdata, msg):
    print(f'{msg.topic}: {msg.payload.decode()}')

client = mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
client.connect('localhost', 1883, 60)
client.loop_forever()

This subscribes to a temperature sensor topic. Any device publishing to sensors/temperature will have its messages printed.

§05

Related on TokRepo

§06

Common pitfalls

  • Default credentials on the dashboard are a security risk. Change the admin password immediately after deployment, especially in production.
  • EMQX clustering requires proper network configuration. Nodes need to discover each other via DNS or static seeds, and firewalls must allow Erlang distribution ports.
  • MQTT QoS 2 (exactly-once delivery) adds significant overhead. Use QoS 0 or 1 unless your application truly requires exactly-once semantics.

Frequently Asked Questions

How many concurrent connections can EMQX handle?+

EMQX is designed to handle millions of concurrent MQTT connections on a single cluster. The exact number depends on hardware, message rates, and QoS levels. Official benchmarks demonstrate 100 million+ connections in clustered configurations.

Does EMQX support MQTT 5.0?+

Yes. EMQX fully implements MQTT 5.0 including shared subscriptions, topic aliases, flow control, message expiry, and user properties. It also supports MQTT 3.1.1 and 3.1 for backward compatibility.

Can EMQX integrate with databases directly?+

Yes. The built-in rule engine can route messages to PostgreSQL, MySQL, MongoDB, ClickHouse, TimescaleDB, and other databases without writing custom bridge code. Configuration is done through the dashboard or API.

Is EMQX free to use?+

EMQX has an open-source edition under the Apache 2.0 license that is free. There is also an Enterprise edition with additional features like advanced clustering, data integration, and commercial support.

How does EMQX compare to Mosquitto?+

Mosquitto is a lightweight single-node MQTT broker suited for small deployments. EMQX is built for horizontal scaling with native clustering, a rule engine, and a dashboard. Choose Mosquitto for embedded use; choose EMQX for production IoT platforms.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets