Top Related Projects
A distributed MQTT message broker based on Erlang/OTP. Built for high quality & Industrial use cases. The VerneMQ mission is active & the project maintained. Thank you for your support!
Open source RabbitMQ: core server and tier 1 (built-in) plugins
Apache ActiveMQ Classic
Mirror of Apache Kafka
Eclipse Mosquitto - An open source MQTT broker
HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5. It is the foundation of the HiveMQ Enterprise Connectivity and Messaging Platform
Quick Overview
EMQX is a highly scalable, distributed MQTT broker for IoT, IIoT, and connected vehicles. It's designed to handle millions of concurrent MQTT connections with high throughput and low latency, making it ideal for large-scale IoT deployments.
Pros
- Highly scalable and can handle millions of concurrent MQTT connections
- Supports multiple protocols including MQTT, MQTT-SN, CoAP, LwM2M, and WebSocket
- Offers a rich set of features including authentication, authorization, and message persistence
- Provides a user-friendly dashboard for monitoring and management
Cons
- Steep learning curve for advanced configurations and customizations
- Resource-intensive for small-scale deployments
- Limited documentation for some advanced features
- Requires careful tuning for optimal performance in large-scale deployments
Getting Started
To get started with EMQX, follow these steps:
-
Install EMQX:
docker run -d --name emqx -p 1883:1883 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx/emqx:latest
-
Access the EMQX dashboard: Open a web browser and navigate to
http://localhost:18083
(default credentials: admin/public) -
Connect an MQTT client: Use an MQTT client library or tool to connect to
localhost:1883
and start publishing/subscribing to topics. -
Monitor connections and messages in the dashboard.
For more detailed setup and configuration options, refer to the official EMQX documentation.
Competitor Comparisons
A distributed MQTT message broker based on Erlang/OTP. Built for high quality & Industrial use cases. The VerneMQ mission is active & the project maintained. Thank you for your support!
Pros of VerneMQ
- Written in Erlang, providing excellent scalability and fault tolerance
- Supports MQTT 5.0 protocol
- Offers flexible plugin system for easy extensibility
Cons of VerneMQ
- Smaller community and ecosystem compared to EMQX
- Less comprehensive documentation and tutorials
- Fewer built-in enterprise features out of the box
Code Comparison
VerneMQ configuration example:
{vmq_server, [
{listener, [
{tcp, 1883, [{max_connections, 10000}]}
]},
{max_client_id_size, 100},
{retry_interval, 20}
]}
EMQX configuration example:
listener.tcp.external = 1883
listener.tcp.external.max_connections = 1024000
mqtt.max_clientid_len = 65535
mqtt.retry_interval = 20s
Both projects use Erlang for their core implementation, but EMQX also incorporates Elixir in some parts. VerneMQ's configuration tends to be more Erlang-centric, while EMQX offers a mix of formats including HOCON and YAML for easier configuration management.
VerneMQ provides a solid MQTT broker with good performance and scalability, but EMQX offers a more comprehensive solution with additional features and better documentation, making it potentially easier for newcomers to adopt and integrate into their systems.
Open source RabbitMQ: core server and tier 1 (built-in) plugins
Pros of RabbitMQ
- More mature and widely adopted in enterprise environments
- Supports multiple messaging protocols (AMQP, MQTT, STOMP)
- Extensive documentation and community support
Cons of RabbitMQ
- Higher resource consumption, especially for large-scale deployments
- More complex configuration and setup process
- Less optimized for IoT and edge computing scenarios
Code Comparison
RabbitMQ (Erlang):
basic_publish(Channel, Exchange, RoutingKey, Payload, Options) ->
amqp_channel:call(Channel, #'basic.publish'{
exchange = Exchange,
routing_key = RoutingKey
}, #amqp_msg{payload = Payload, props = Options}).
EMQX (Erlang):
publish(Topic, Payload, Opts) ->
emqx:publish(emqx_message:make(Topic, Payload, Opts)).
Both EMQX and RabbitMQ are powerful message brokers, but they have different strengths. RabbitMQ excels in enterprise environments with its multi-protocol support and extensive documentation. EMQX, on the other hand, is more focused on IoT scenarios and offers better scalability for large numbers of concurrent connections. The code comparison shows that EMQX has a simpler API for publishing messages, while RabbitMQ's API is more verbose but offers finer-grained control over message properties.
Apache ActiveMQ Classic
Pros of ActiveMQ
- Mature and widely adopted, with a large community and extensive documentation
- Supports multiple protocols (AMQP, MQTT, STOMP) out of the box
- Offers advanced features like message persistence, clustering, and security
Cons of ActiveMQ
- Can be resource-intensive, especially for high-throughput scenarios
- Configuration and setup can be complex for beginners
- Performance may degrade under heavy loads compared to more modern alternatives
Code Comparison
ActiveMQ (Java):
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");
Connection connection = connectionFactory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination destination = session.createQueue("myQueue");
MessageProducer producer = session.createProducer(destination);
EMQX (Erlang):
{ok, C} = emqtt:start_link([{host, "localhost"}, {port, 1883}]),
{ok, _} = emqtt:connect(C),
{ok, _} = emqtt:publish(C, <<"topic">>, <<"payload">>, 0),
ok = emqtt:disconnect(C)
Both ActiveMQ and EMQX are popular message brokers, but they cater to different use cases. ActiveMQ is a more traditional, feature-rich option suitable for enterprise environments, while EMQX is designed for high-performance IoT and real-time messaging scenarios. The code examples demonstrate the different approaches to connecting and publishing messages in each system.
Mirror of Apache Kafka
Pros of Kafka
- Highly scalable and fault-tolerant distributed streaming platform
- Strong ecosystem with numerous tools and integrations
- Excellent performance for high-throughput data streaming use cases
Cons of Kafka
- Steeper learning curve and more complex setup compared to EMQX
- Higher resource consumption, especially for smaller deployments
- Less suitable for IoT-specific scenarios and MQTT protocol support
Code Comparison
EMQX (Erlang):
-module(emqx_broker).
-export([publish/1]).
publish(Message) ->
emqx:publish(Message).
Kafka (Java):
Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092");
Producer<String, String> producer = new KafkaProducer<>(props);
producer.send(new ProducerRecord<>("topic", "key", "value"));
producer.close();
EMQX is an MQTT broker written in Erlang, focusing on IoT messaging, while Kafka is a distributed streaming platform written in Java and Scala. EMQX excels in MQTT protocol support and IoT scenarios, offering easier setup and lower resource usage. Kafka shines in high-throughput data streaming, scalability, and its extensive ecosystem. The choice between them depends on specific use cases and requirements.
Eclipse Mosquitto - An open source MQTT broker
Pros of Mosquitto
- Lightweight and efficient, ideal for resource-constrained devices
- Simple to set up and configure, with a straightforward configuration file
- Widely adopted and well-documented, with a large community support
Cons of Mosquitto
- Limited scalability for high-throughput scenarios
- Fewer built-in features compared to EMQX, requiring additional plugins for advanced functionality
- Less comprehensive monitoring and management tools out-of-the-box
Code Comparison
Mosquitto configuration example:
listener 1883
allow_anonymous true
persistence true
persistence_location /var/lib/mosquitto/
EMQX configuration example:
listeners.tcp.default {
bind = "0.0.0.0:1883"
}
allow_anonymous = true
module.persistence {
enable = true
storage_type = "mnesia"
}
Both examples show basic configuration for setting up a listener, allowing anonymous connections, and enabling persistence. EMQX's configuration is more structured and offers more granular control over various settings, while Mosquitto's configuration is simpler and more straightforward.
HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5. It is the foundation of the HiveMQ Enterprise Connectivity and Messaging Platform
Pros of HiveMQ Community Edition
- More extensive documentation and community support
- Better integration with enterprise systems and cloud platforms
- Stronger focus on security features and compliance
Cons of HiveMQ Community Edition
- Less flexible configuration options compared to EMQX
- Lower performance in high-throughput scenarios
- More resource-intensive, requiring more system resources
Code Comparison
EMQX (Erlang):
-module(emqx_broker).
-export([publish/1]).
publish(Message) ->
emqx:publish(Message).
HiveMQ Community Edition (Java):
@Component
public class MqttPublisher {
@Autowired
private HiveMQClient hiveMQClient;
public void publish(String topic, String payload) {
hiveMQClient.publish(topic, payload.getBytes(), QoS.AT_LEAST_ONCE);
}
}
Both EMQX and HiveMQ Community Edition are popular MQTT brokers, but they cater to different use cases. EMQX, written in Erlang, offers high scalability and performance, making it suitable for large-scale IoT deployments. HiveMQ Community Edition, built on Java, provides better enterprise integration and security features, making it a good choice for businesses with strict compliance requirements. The code examples showcase the different programming paradigms used in each project, reflecting their underlying architectures and design philosophies.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
EMQX
EMQX is the world's most scalable and reliable MQTT platform, designed for high-performance, reliable, and secure IoT data infrastructure. It supports MQTT 5.0, 3.1.1, and 3.1, as well as other protocols like MQTT-SN, CoAP, LwM2M, and MQTT over QUIC. EMQX enables you to connect millions of IoT devices, process and route messages in real time, and integrate with a wide range of backend data systems. It's ideal for applications in AI, IoT, Industrial IoT (IIoT), connected vehicles, smart cities, and beyond.
Starting from v5.9.0, EMQX has unified all features from the previous Open Source and Enterprise editions into a single, powerful offering with the Business Source License (BSL) 1.1.
If you want to understand why we made the change, please read this blog post.
Please go to the License section for more details about BSL 1.1.
Key Features
EMQX delivers a powerful set of capabilities for modern connected systems:
Comprehensive Protocol Support
- Full MQTT v5.0, v3.1.1, and v3.1 support.
- MQTT over QUIC: Leverage the benefits of QUIC for faster connection establishment, reduced head-of-line blocking, and seamless connection migration.
- Support for other IoT protocols like LwM2M, CoAP, MQTT-SN, and more through gateways.
Massive Scalability & High Availability
- Connect 100M+ of concurrent MQTT clients with a single cluster.
- Process millions of messages per second with sub-millisecond latency.
- Masterless clustering for high availability and fault tolerance.
- Seamless global communication with EMQX Cluster Linking.
Powerful Rule Engine & Data Integration
- SQL-based Rule Engine to process, transform, enrich, and filter in-flight data.
- Seamless data bridging and integration with 50+ cloud services and enterprise systems, including:
- Message Queues: Kafka, RabbitMQ, Pulsar, RocketMQ, etc.
- Databases: PostgreSQL, MySQL, MongoDB, Redis, ClickHouse, InfluxDB, etc.
- Cloud Services: AWS Kinesis, GCP Pub/Sub, Azure Event, Confluent Cloud, and more.
- Webhook support for easy integration with custom services.
Flow Designer
- Dragâandâdrop canvas to orchestrate realâtime data pipelines with zero code, using nodes for rules, integrations, and AI tasks.
Smart Data Hub
- Schema Registry: Define, store, and manage data schemas to ensure consistency.
- Schema Validation: Validate incoming data against registered schemas to maintain data integrity.
- Message Transformation: Convert data between different formats and structures to facilitate seamless integration.
AI Processing & Integration:
- Native AI processing capabilities for IoT data streams.
- Integration with popular AI services.
- Support for AI-driven decision making at the edge or in the cloud.
Robust Security
- Secure connections with TLS/SSL and WSS.
- Flexible authentication mechanisms: username/password, JWT, PSK, X.509 certificates, etc.
- Granular access control with ACLs.
- Integration with external authentication databases (LDAP, SQL, Redis).
Advanced Observability & Management:
- Comprehensive monitoring with Prometheus, Grafana, Datadog, and OpenTelemetry.
- Detailed logging and tracing capabilities.
- User-friendly Dashboard for cluster overview and management.
- Rich HTTP API for automation and third-party integration.
Extensibility
- Plugin architecture for extending functionality.
- Hooks for customizing behavior at various points in the message lifecycle.
Unified Experience:
- With the BSL 1.1 license (from v5.9.0), all features, including those previously exclusive to the enterprise edition, are available to all developers.
Quick Start
Try EMQX Cloud
The simplest way to set up EMQX is to create a managed deployment with EMQX Cloud. You can try EMQX Cloud for free.
Run a single node using Docker
docker run -d --name emqx \
-p 1883:1883 -p 8083:8083 -p 8084:8084 \
-p 8883:8883 -p 18083:18083 \
emqx/emqx-enterprise:latest
Next, please follow the Install EMQX Using Docker guide for further instructions.
Run EMQX cluster on Kubernetes
Please refer to the official EMQX Operator documentation for details.
Download EMQX
If you prefer to install and manage EMQX yourself, you can download the latest version from the official site.
For more installation options, see the EMQX installation documentation
Documentation
- EMQX self-hosted: docs.emqx.com/en/emqx/latest.
- EMQX Cloud: docs.emqx.com/en/cloud/latest.
Contributing
Please see our contributing guide.
For more organised improvement proposals, you can send pull requests to EIP.
Community
- Follow us on: X, YouTube.
- Ask Questions: GitHub Discussions or EMQX Community Slack.
- Report Bugs: GitHub Issues.
- Discord: EMQX Discord Server.
Resources
- EMQX Website: emqx.com
- EMQX Blog: emqx.com/en/blog
- MQTT Client Programming: Tutorials
- MQTT SDKs: Popular SDKs
- MQTT Tool: MQTTX
Build From Source
The master branch tracks the latest version 5.
- EMQX 5.4 and newer can be built with OTP 25 or 26
- EMQX 5.9+ can be built with OTP 27
git clone https://github.com/emqx/emqx.git
cd emqx
make
_build/emqx-enterprise/rel/emqx/bin/emqx console
For 4.2 or earlier versions, release has to be built from another repo.
git clone https://github.com/emqx/emqx-rel.git
cd emqx-rel
make
_build/emqx/rel/emqx/bin/emqx console
Rolling Upgrade Paths Since 5.0
Below is the matrix supported rolling upgrade paths since 5.0.
- Version numbers end with
?
e.g.6.0?
are future releases. - â : Supported, or planed to support.
- â ï¸: May experience issues, require manual resolution.
- â: Not supported.
- ð: Tentative support for future versions.
See release notes for detailed information.
From\To | 5.1 | 5.2 | 5.3 | 5.4 | 5.5 | 5.6 | 5.7 | 5.8 | 5.9 | 5.10? | 6.0? |
---|---|---|---|---|---|---|---|---|---|---|---|
5.0 | â | â | â | â | â | â | â | â | â ï¸[1] | â[2] | â[2] |
5.1 | â | â | â | â | â | â | â | â | â | â[2] | â[2] |
5.2 | â | â | â | â | â | â | â | â | â[2] | â[2] | |
5.3 | â | â | â | â | â | â | â | â[2] | â[2] | ||
5.4 | â | â | â ï¸ | â | â | â | â | ð | |||
5.5 | â | â ï¸ | â | â | â | â | ð | ||||
5.6 | â | â | â | â | â | ð | |||||
5.7 | â | â | â | â | ð | ||||||
5.8 | â | â | â | ð | |||||||
5.9 | â | â | â | ||||||||
5.10? | â | â | |||||||||
6.0? | â |
- [1] Old limiter configs should be deleted from the config files (
etc/emqx.conf
anddata/configs/cluster-override.conf
) before upgrade. - [2] Pre-5.4 routing table will be deleted. Upgrade to 5.9 first, then perform a full-cluster restart (not rolling) before upgrade to 5.10 or later.
License
Important License Update
Effective from version 5.9.0, EMQX has transitioned from Apache 2.0 to the Business Source License (BSL) 1.1.
License Requirement for Clustering (v5.9.0+)
Starting with EMQX v5.9.0, due to the license change and the unification of all features, deploying an EMQX cluster (more than 1 node) requires a license file to be loaded.
Please refer to the following resources for details on license acquisition, application, and the specifics of the BSL 1.1.
Top Related Projects
A distributed MQTT message broker based on Erlang/OTP. Built for high quality & Industrial use cases. The VerneMQ mission is active & the project maintained. Thank you for your support!
Open source RabbitMQ: core server and tier 1 (built-in) plugins
Apache ActiveMQ Classic
Mirror of Apache Kafka
Eclipse Mosquitto - An open source MQTT broker
HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5. It is the foundation of the HiveMQ Enterprise Connectivity and Messaging Platform
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot