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.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
Boost IoT Messaging with mica-mqtt: High-Performance Java AIO MQTT Broker

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 FastJsonMessageSerializer to JsonMessageSerializer.

Added module-info.java for modularization.

v2.3.5 – 2024-09-01

Added SSLEngineCustomizer for 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:

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

Server dependency:

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

6.2 Solon Projects

Client dependency:

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

Server dependency:

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

6.3 JFinal Projects

Client dependency:

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

Server dependency:

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

6.4 Other Java Projects

Client dependency:

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

Server dependency:

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

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

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

javaIoTopen-sourceMQTTlow-latency
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

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.