Starschema Blog
Published in

Starschema Blog

MQTT on Steroids: Running EMQX Enterprise on Kubernetes

Image generated by Dall-E.

Introducing EMQX, Your Open-Source MQTT Broker

  1. Scalability: EMQX can handle millions of concurrent connections and messages. It’s written in Erlang, a language designed for scalability with low latency and high availability.
  2. High availability: EMQX supports horizontal clustering and message persistence to ensure high availability.
  3. Customizability: EMQX offers a plugin architecture that enables custom extensions and enhancements.
  1. Open source: EMQX is open-source and free to use, with a large community of developers contributing to its development and evolution. There’s also an Enterprise version for larger deployments and commercial support.
  2. High-performance: It’s designed for high-throughput, low-latency message processing. In the IIoT (industrial internet of things) space, it’s common to expect messages from millions of devices or process millions of messages.
  3. Built-in processing engine: EMQX supports routing, filtering and alerting out-of-the-box. It can also send messages to external systems like databases or other message queues.
  4. And it works on-premises, as well in the cloud or hybrid deployments.

Deploying in Kubernetes

  1. Scalability: Kubernetes makes it easy to scale EMQX horizontally by adding or removing nodes as needed. EMQX has its own Kubernetes operator to take care of scaling.
  2. Resilience: Kubernetes provides automatic failover and self-healing capabilities, ensuring high availability for EMQX.
  3. Portable deployment: Kubernetes allows EMQX to be deployed on-premises, in the cloud or in hybrid environments, which provides greater flexibility and portability. The same deployment automation can work everywhere.

Deploying with Command Line Only

helm repo add jetstack helm repo update helm install \ cert-manager jetstack/cert-manager \ — namespace cert-manager \ — create-namespace \ — version v1.11.0 \ — set installCRDs=true
Install cert-manager with Helm. Make sure you install custom resources (CRDs) as well.
helm repo add emqx helm repo update helm install emqx-operator emqx/emqx-operator \ — namespace emqx-operator-system — create-namespace
Install EMQX Operator through their official Helm chart.
The resource kind is EmqxEnterprise in case of the Enterprise Edition.
Fresh new installation of EMQX Enterprise Edition. Without a trial license, you’re limited to 10 connections per second. The open-source version does not have this limitation.

Deploying with Pulumi and Antares iDL

from pulumi_kubernetes.helm.v3 import Release, ReleaseArgs, RepositoryOptsArgs def deploy(): cert_manager_release = Release( “cert-manager”, ReleaseArgs( chart=”cert-manager”, name=”cert-manager”, repository_opts=RepositoryOptsArgs( repo=””, ), namespace=”cert-manager”, create_namespace=True, values={“installCRDs”: “true”}, ), )
The cert-manager will have its own namespace.
Install and configure EMQX with Pulumi.
Output from Pulumi Up.

Using EMQX — Testing the Installation

EMQX’s admin interface gives you the option to understand your deployment as well as to interact with plugins, set up rules, etc.
Subscribing to “#” will show all incoming messages in the system.




Data contains intelligence that can change the world — we help people discover, manage and use this intelligence.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tamas Foldi

Helping enterprises to become more data driven @ HCLTech, co-founder & former CEO @ Starschema