Backend Development 6 min read

What’s New in Dromara mica-mqtt 2.4.5? Upgrade Guide and Key Features

The Dromara mica-mqtt 2.4.5 release introduces Maven groupId changes, custom deserialization for @MqttClientSubscribe, numerous bug fixes, enhanced Android compatibility, snapshot support, and detailed migration documentation, while also showcasing BladeX IoT platform best‑practice examples.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
What’s New in Dromara mica-mqtt 2.4.5? Upgrade Guide and Key Features

1. Introduction

Dromara mica-mqtt 2.4.5 official release is out. Starting from version 2.4.x the Maven groupId has moved to

org.dromara.mica-mqtt

, package name to

org.dromara

, other usage remains the same. Strongly recommend upgrading to the new 2.4.x.

Because the old documentation was scattered, a new documentation site has been added: https://mica-mqtt.dromara.org

2. Changelog

v2.4.5 – 2025-05-06

✨ mica-mqtt-client-spring-boot-starter now supports custom deserialization for

@MqttClientSubscribe

annotation.

✨ Optimized code; Spring Boot client can customize MqttClientSubscribeDetector (thanks @galaxy-sea).

✨ Upgraded mica-net to 1.1.6, fixing Eclipse Paho MQTT WebSocket client errors.

✨ Dependency adjustments reduce security warnings in example projects.

🐛 Fixed client reconnection issue when messages are sent during server restart (thanks @wtjperi2003).

🐛 Fixed Netty MQTT codec assignment error of maxQoS parameter in ConnAck Properties.

v2.4.4 – 2025-04-13

✨ mica-mqtt-server now better compatible with Android (thanks @KittenBall).

v2.4.3 – 2025-03-23

✨ Central Portal now supports snapshots (90‑day storage, auto‑publish on dev branch).

✨ Code cleanup, removed unused parts, moved to mica-net.

✨ Added

heartbeatMode

and

heartbeatTimeoutStrategy

to client for weak‑network scenarios.

✨ mica-mqtt-server now depends on mica-net-http by default, simplifying usage.

✨ Exposed

getMqttServer()

method in MqttServerTemplate.

✨ Server starter now tolerates missing

MeterRegistry

bean.

3. Key Notes

In version 2.4.5, the

@MqttClientSubscribe

annotation in

mica-mqtt-client-spring-boot-starter

adds a deserialization attribute defaulting to JSON. Users can implement

MqttDeserializer

for custom serialization. The annotation also supports parameter binding by type as follows:

<code>/** 
 * @param topic  mqtt topic
 * @param message mqtt raw message
 * @param data user‑defined java bean
 */
@MqttClientSubscribe(
    value = "/test/json",
    deserialize = MqttJsonDeserializer.class // default JSON deserializer from 2.4.5
)
public void testJson(String topic, MqttPublishMessage message, TestJsonBean data) {
    // 2.4.5 supports 2‑3 parameters with mapping rules:
    // String → topic, MqttPublishMessage → raw message (including MQTT5 props),
    // byte[] / ByteBuffer → payload, other types → JSON serialization
    logger.info("topic:{} json data:{}", topic, data);
}
</code>

4. Documentation

MQTT basics, MQTTX, mica-mqtt usage videos

mica-mqtt quick start guide

Frequently asked questions

Release versions

Migration guide for older versions

5. Open‑Source Repositories

Gitee: https://gitee.com/dromara/mica-mqtt

GitHub: https://github.com/dromara/mica-mqtt

GitCode: https://gitcode.com/dromara/mica-mqtt

6. Best Practice

BladeX IoT platform is a highly integrated solution covering device management, data collection, real‑time monitoring, data analysis and open APIs. It supports popular time‑series databases such as TDengine, InfluxDB 1.x/2.x and IoTDB, and offers excellent bulk‑ingest performance.

Interface Overview:

Official site: https://iot.bladex.cn

Demo site: https://iot.javablade.com

backendJavaSpring BootIoTreleaseMQTT
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.