Boost IoT Messaging with mica-mqtt: High-Performance Java AIO MQTT Broker
mica-mqtt is a lightweight, low‑latency, high‑performance open‑source MQTT component built on Java AIO that simplifies integration, supports multiple protocols and frameworks, and offers extensive features for IoT, edge, and messaging applications.
1. Introduction
mica-mqtt is a simple, low‑latency, high‑performance MQTT IoT open‑source component built on Java AIO. It is easy to integrate into existing services and reduces development cost of custom IoT platforms.
2. Features
Supports MQTT v3.1, v3.1.1 and v5.0.
Supports WebSocket MQTT sub‑protocol (compatible with mqtt.js).
Provides HTTP REST API (see documentation).
Provides MQTT client and server implementations.
Supports retained messages, will messages, and custom message forwarding for clustering.
Includes Alibaba Cloud MQTT client demo.
Can be compiled to native executable with GraalVM.
Quick integration with Spring Boot, Solon and JFinal.
Spring‑Boot starter exposes Prometheus + Grafana metrics.
Cluster support via Redis Stream (see mica-mqtt-broker module).
3. Use Cases
IoT cloud MQTT broker.
Edge‑side message communication.
Group‑chat IM.
Message push services.
Simple, easy‑to‑use MQTT client.
4. Release Notes
v2.3.7 – 2024-09-22
Optimized MQTT server starter with schedule methods.
Adjusted MQTT client schedule methods.
v2.3.6 – 2024-09-14
Improved stop/restart behavior for server and client; added Spring Boot devtools hot‑restart support.
Refactored
FastJsonMessageSerializerto
JsonMessageSerializer.
Added
module-info.javafor modularization.
v2.3.5 – 2024-09-01
Added
SSLEngineCustomizerfor custom TLS versions and cipher suites.
Updated Solon plugin default configuration (thanks to @peigen).
5. Important Note
Supports stop‑then‑restart and Spring Boot devtools hot‑restart for easy plugin development.
6. Usage
6.1 Spring Boot Projects
Client dependency:
<code><dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-mqtt-client-spring-boot-starter</artifactId>
<version>${mica-mqtt.version}</version>
</dependency></code>Server dependency:
<code><dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-mqtt-server-spring-boot-starter</artifactId>
<version>${mica-mqtt.version}</version>
</dependency></code>6.2 Solon Projects
Client dependency:
<code><dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-mqtt-client-solon-plugin</artifactId>
<version>${mica-mqtt.version}</version>
</dependency></code>Server dependency:
<code><dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-mqtt-server-solon-plugin</artifactId>
<version>${mica-mqtt.version}</version>
</dependency></code>6.3 JFinal Projects
Client dependency:
<code><dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-mqtt-client-jfinal-plugin</artifactId>
<version>${mica-mqtt.version}</version>
</dependency></code>Server dependency:
<code><dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-mqtt-server-jfinal-plugin</artifactId>
<version>${mica-mqtt.version}</version>
</dependency></code>6.4 Other Java Projects
Client dependency:
<code><dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-mqtt-client</artifactId>
<version>${mica-mqtt.version}</version>
</dependency></code>Server dependency:
<code><dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-mqtt-server</artifactId>
<version>${mica-mqtt.version}</version>
</dependency></code>7. Documentation
MQTT basics, mqttx, mica-mqtt video tutorial.
Examples and quick start guide.
FAQ collection.
Release notes.
8. Best Practices
Demo site: https://iot.javablade.com
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.