MQTT Broker Comparison – Which is the Best for Your IoT Application?
MQTT brokers help implement the publish-subscribe communication model between devices and applications. The MQTT broker also helps implement rules and filters that help make the communications efficient and secure.
Where are MQTT Brokers Used?
The most common use cases for MQTT and MQTT brokers are in IoT applications. In fact, MQTT is the de facto standard for IoT use cases. It’s deployed in bandwidth and resource-challenged environments where the clients have to be lightweight.
Thanks to the efficient nature of the protocol, MQTT is deployed across a variety of verticals and use cases. For example, it helps car-sharing app ShareNow to give its users instant access to their cars, it helps Munich’s public transportation system with real-time passenger information, and it helps Matternet monitor autonomous drones delivering medical samples.
Types of MQTT Broker
The MQTT specification lays out the functionality expected from an MQTT-based deployment, and that offers a common definition that communities and businesses can then use for building their applications.
Currently, an MQTT broker is available in the following variants:
Types of MQTT Brokers | Examples |
---|---|
Open Source | HiveMQ CE, Mosquitto, VerneMQ, etc. |
Commercial | HiveMQ Professional and Enterprise, EMQ, VerneMQ, etc. |
Cloud (Managed) | HiveMQ Cloud, CloudMQTT, AWS IoT Core, Azure IoT Hub, etc. |
General-purpose brokers with MQTT support | Solace PubSub+, IBM MQ, RabbitMQ, ActiveMQ, etc. |
How to Choose the Best MQTT Broker?
An effective way to evaluate software technology is through Architectural Requirements (a.k.a. Non-Functional Requirements). An MQTT broker comparison based on these architectural requirements should give you insight into how to find the best MQTT broker for your needs.
Note: This is a category related view and HiveMQ’s Enterprise MQTT Broker is not the focus of this table.
Common Challenges by Variants
Open Source | Commercial | Cloud-Managed | General Purpose | |
---|---|---|---|---|
Scalability | Limited scalabilty | Do not scale to millions of devices and messages | Require support tickets to add capacity | Unable to scale linearly and require massive step upgrades |
Security | Limited options | Lack support for latest cipher suites for encryption | Lack flexibility e.g. turning off TLS for private networks to save compute and bandwidth | Miss advanced security features like plug-ins and chaining of authentication / authorization logic |
Resilience | Cannot cluster for higher availability | Missing plugins for DB integration | Lack reason codes and other core MQTT features which sacrifices resolution times | Master-Slave architecure create long failover time Miss key features like Retained Messages that hurts recovery times |
Agility | Hard to manage when coded in difficult libraries like Erlang | Require restarting application when adding nodes | Poor MQTT compliance makes interwork with systems unpredictable | |
Observability | Very few meaningful metrics available | Can’t query individual endpoints - action/hops inside the cloud are a black box | Force a stack of closed management systems that hamper collaboration between systems | |
Availability | No overload protection from overactive publishers | Persist on memory and not on disk causing data loss in many scenarios |
These NFRs should form the foundation of an MQTT broker comparison and it will help to have deeper understanding of each of the architectural requirements:
Scalability of An MQTT Broker
What to look for | Why |
---|---|
Native support for the publish-subscribe pattern | Efficiency of Fan-in/Fan-out pattern helps avoid spaghetti architecture and its complexity |
Linear scalability | Helps avoid abrupt infrastructure costs when handing incremental growth |
High number of topics and concurrent connections | Helps teams prioritize the business logic over managing lower-level components |
Grow and shrink cluster size at runtime without losing data | Keeps availability and uptime commitments, whether scaling up or down |
MQTT Broker Security
What to look for | Why |
---|---|
User authentication with third-party systems | Helps secure and maintain credentials data independent of the broker |
TLS secured communication between broker-clients and also between brokers in a cluster. | Prevents eavesdropping and loss of data |
Nesting/chaining of authentication logic | Creates flexibility for a variety of use cases with custom logic for authenticating and authorizing clients |
Efficiency through advanced features Native TLS, OCSP Stapling etc. | IoT-scale deployments are very demanding on the underlying infrastructure and there are significant untapped efficiencies in security |
Access control and fine-grained permission control | Helps ensure only authorized endpoints come through |
Resilience of An MQTT Broker
What to look for | Why |
---|---|
Fault tolerance at multiple levels (broker, cluster, cloud) | IoT environments are prone to network outages and disruptions |
Masterless cluster architecture | Master/Slave architecture suffers from long recovery times which hurts application availability and performance |
Agility of An MQTT Broker
What to look for | Why |
---|---|
Variety of deployment options - on-premise, cloud, fully-managed | Helps right-size your deployment for different use cases while operating under the same technical principles |
Easy maintainability through standards-based approach | Ease of development that helps accelerate time to market |
Testability | For quality and performance assurance |
Support for multi-cloud strategy | Helps avoid vendor lock-in and brings in the best features from multiple platforms |
Tested and packaged extensions for common enterprise system | Complex integration like Apache Kafka etc. can be very time-consuming to build and maintain in-house |
Expertise to certify extensions for enterprise use | During deployment and support issues, a vendor-certified extension is one less problem for the enterprise |
Observability of An MQTT Broker
What to look for | Why |
---|---|
Unhindered access to metrics | Metrics (including throughput in amounts and bytes and rates, counts and bytes per different MQTT message type) enable you to monitor the health of your central MQTT messaging platform and proactively identify anomalies, bottlenecks and other technical issues |
JMX monitoring | Allows integration into a large set of JMX based Java monitoring tools |
Machine readable audit logs | Helps capture overview of all actions performed on the broker that for better compliance and troubleshooting |
Trace recordings | Creates human-readable log files to assess what’s really happening with a client, or on a topic, by analyzing only specific information from the broker cluster |
Availability of An MQTT Broker
What to Look for | Why |
---|---|
Cluster Overload Protection | Reduces the rate of incoming messages and connection requests from publishing clients that risk overloading a cluster |
Built-in support for features like Retained Messages | In real life environments, a client needs a new/last state to be productive |
Usability of An MQTT Broker
What to Look for | Why |
---|---|
REST API | For programmatic access to the broker |
K8s Operator | Your DevOps can easily orchestrate, automate, and manage the lifecycle of multiple HiveMQ cluster deployments within Kubernetes (platform agnostic) |
Wide support of libraries | Helps your developers spend less time learning new coding languages and constructs |
Extensibility of An MQTT Broker
What to Look for | Why |
---|---|
SDK to build extensions for your use case | Meet specific application needs that require access to advanced features related to session management, advanced system integration capabilities, inter-extension communication in a cluster, etc. |
Hot reload of extensions | Enables access to the features of an extension without downtime |
Enterprise tools extensions | Pre-installed enterprise extensions can help you (for example) extend the broker ecosystem into your security tools, forward messages into other broker clusters, or integrate with tools like Confluent/Kafka |
Final Thoughts on Choosing the Best MQTT Broker
From an architectural perspective, it’s clear that enterprises should choose an MQTT broker that scales without compromising on the security and resilience of the application. The ability to tweak the parameters of the broker and integrate with enterprise systems like Kafka can be very powerful for a business.
While resilience, security, flexibility, and scalability are key, it’s important that the MQTT broker you choose is easy to use and manage - manually and programmatically.
HiveMQ Enterprise MQTT Broker has brought innovative features to mature businesses for their mission-critical applications. HiveMQ has 100% compliance to the MQTT 3.1.1 and 5 standards while offering highly-specialized professional services and 24x7 support to 150+ IoT customers across the globe.
See how HiveMQ Enterprise MQTT Broker stacks up against your enterprise criteria for deployment. Contact us today.
Watch the Video
Gaurav Suman
Gaurav Suman, Director of Product Marketing at HiveMQ, has over a decade of experience in roles like Solutions Architect and Business Development Manager. His journey includes launching market-first products and achieving a 2X revenue increase in the past year. Eager to connect with industry peers, Gaurav pushes the boundaries of what Product Marketing can achieve for businesses.