Backend Development 8 min read

Boost Your IoT Projects with mica-mqtt: A High-Performance Java AIO MQTT Solution

mica-mqtt is a simple, low-latency, high-performance open-source MQTT component built on Java AIO, supporting MQTT v3.1, v3.1.1, v5.0, WebSocket, HTTP API, client/server modes, clustering via Redis Stream, and easy integration with Spring Boot, Solon, and JFinal for diverse IoT and messaging scenarios.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
Boost Your IoT Projects with mica-mqtt: A High-Performance Java AIO MQTT Solution

1. Introduction

mica-mqtt is a simple, low‑latency, high‑performance MQTT open‑source component implemented with 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 protocols.

Supports WebSocket MQTT sub‑protocol (compatible with mqtt.js).

Provides HTTP REST API (documentation at https://gitee.com/596392912/mica-mqtt/blob/master/docs/http-api.md).

Provides MQTT client.

Provides MQTT server.

Supports MQTT will messages.

Supports retained messages.

Custom message (mq) processing and forwarding for clustering.

Demo for connecting to Alibaba Cloud MQTT.

Supports compilation to native executable with GraalVM.

Quick integration with Spring Boot, Solon and JFinal projects.

mica-mqtt-spring-boot-starter integrates with Prometheus + Grafana.

Cluster implementation based on Redis Stream (see mica-mqtt-broker module).

3. Use Cases

IoT (cloud MQTT broker)

IoT (edge message communication)

Group chat IM

Message push

Simple, easy‑to‑use MQTT client

4. Update Log

v2.3.9 – 2024-11-16

✨ SSL support for PKCS12 certificates (auto‑detect .jks/.keystore as JKS, .p12/.pfx as PKCS12, default JKS).

✨ Optimized Solon version dependency (compile‑time only) to be compatible from 2.8.0 to 3.x.

v2.3.8 – 2024-09-26

✨ Upgraded to Solon v3 and adjusted compatibility.

🐛 Added keepAliveBackoff support for mica‑net heartbeat; fixed a rule omission in mica‑mqtt server open‑source version.

5. Usage

5.1 Spring Boot Projects

Client:

<code>
<dependency>
  <groupId>net.dreamlu</groupId>
  <artifactId>mica-mqtt-client-spring-boot-starter</artifactId>
  <version>${mica-mqtt.version}</version>
</dependency>
</code>

Documentation: https://gitee.com/596392912/mica-mqtt/blob/master/starter/mica-mqtt-client-spring-boot-starter/README.md

Server:

<code>
<dependency>
  <groupId>net.dreamlu</groupId>
  <artifactId>mica-mqtt-server-spring-boot-starter</artifactId>
  <version>${mica-mqtt.version}</version>
</dependency>
</code>

Documentation: https://gitee.com/596392912/mica-mqtt/blob/master/starter/mica-mqtt-server-spring-boot-starter/README.md

5.2 Solon Projects

Client:

<code>
<dependency>
  <groupId>net.dreamlu</groupId>
  <artifactId>mica-mqtt-client-solon-plugin</artifactId>
  <version>${mica-mqtt.version}</version>
</dependency>
</code>

Documentation: https://gitee.com/596392912/mica-mqtt/blob/master/starter/mica-mqtt-client-solon-plugin/README.md

Server:

<code>
<dependency>
  <groupId>net.dreamlu</groupId>
  <artifactId>mica-mqtt-server-solon-plugin</artifactId>
  <version>${mica-mqtt.version}</version>
</dependency>
</code>

Documentation: https://gitee.com/596392912/mica-mqtt/blob/master/starter/mica-mqtt-server-solon-plugin/README.md

5.3 JFinal Projects

Client:

<code>
<dependency>
  <groupId>net.dreamlu</groupId>
  <artifactId>mica-mqtt-client-jfinal-plugin</artifactId>
  <version>${mica-mqtt.version}</version>
</dependency>
</code>

Documentation: https://gitee.com/596392912/mica-mqtt/blob/master/starter/mica-mqtt-client-jfinal-plugin/README.md

Server:

<code>
<dependency>
  <groupId>net.dreamlu</groupId>
  <artifactId>mica-mqtt-server-jfinal-plugin</artifactId>
  <version>${mica-mqtt.version}</version>
</dependency>
</code>

Documentation: https://gitee.com/596392912/mica-mqtt/blob/master/starter/mica-mqtt-server-jfinal-plugin/README.md

5.4 Other Java Projects

Client:

<code>
<dependency>
  <groupId>net.dreamlu</groupId>
  <artifactId>mica-mqtt-client</artifactId>
  <version>${mica-mqtt.version}</version>
</dependency>
</code>

Documentation: https://gitee.com/596392912/mica-mqtt/blob/master/mica-mqtt-client/README.md

Server:

<code>
<dependency>
  <groupId>net.dreamlu</groupId>
  <artifactId>mica-mqtt-server</artifactId>
  <version>${mica-mqtt.version}</version>
</dependency>
</code>

Documentation: https://gitee.com/596392912/mica-mqtt/blob/master/mica-mqtt-server/README.md

6. Documentation

MQTT basics, mqttx, mica-mqtt video tutorial: https://www.bilibili.com/video/BV1wv4y1F7Av

mica-mqtt examples and quick start: https://gitee.com/596392912/mica-mqtt/blob/master/example/README.md

Common issues FAQ: https://gitee.com/596392912/mica-mqtt/issues/I45GO7

Release versions: https://gitee.com/596392912/mica-mqtt/blob/master/CHANGELOG.md

7. Best Practices

backendJavaSpring Bootopen-sourceIoTMQTT
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.