Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:lets-mica/mica-mqtt into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunMengLu committed Sep 11, 2024
2 parents f9c2b4c + 39c474d commit c783b5c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
4 changes: 1 addition & 3 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@
- [Netty MQTT Client](https://github.com/jetlinks/netty-mqtt-client)

## 🏗️ MQTT Client Tools
- [Mqttx: An Elegant Cross-platform MQTT 5.0 Client Tool](https://mqttx.app/)
- [MQTT WebSocket Debugging](http://tools.emqx.io/)
- [MQTT.fx MQTT Client](http://mqttfx.org/)
- [Mqttx: An Elegant Cross-platform MQTT 5.0 Client Tool](https://mqttx.app)

## 🍻 Open Source Recommendations
- `Avue`: A Vue-based configurable front-end framework: [https://gitee.com/smallweigit/avue](https://gitee.com/smallweigit/avue)
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
- [x] 支持 http rest api,[http api 文档详见](docs/http-api.md)
- [x] 支持 MQTT client 客户端。
- [x] 支持 MQTT server 服务端。
- [x] 支持 MQTT client、server 共享订阅支持(捐助VIP版采用 topic 树存储,跟 topic 数无关,百万 topic 性能依旧)。
- [x] 支持 MQTT client、server 共享订阅支持(私服加强版采用 topic 树存储,跟 topic 数无关,百万 topic 性能依旧)。
- [x] 支持 MQTT 遗嘱消息。
- [x] 支持 MQTT 保留消息。
- [x] 支持自定义消息(mq)处理转发实现集群。
Expand Down Expand Up @@ -172,9 +172,7 @@
- [netty-mqtt-client](https://github.com/jetlinks/netty-mqtt-client)

## 🏗️ mqtt 客户端工具
- [mqttx 优雅的跨平台 MQTT 5.0 客户端工具](https://mqttx.app/cn/)
- [mqtt websocket 调试](http://tools.emqx.io/)
- [mqttx.fx mqtt 客户端](http://mqttfx.org/)
- [mqttx 优雅的跨平台 MQTT 5.0 客户端工具](https://mqttx.app)

## 🍻 开源推荐
- `Avue` 基于 vue 可配置化的前端框架:[https://gitee.com/smallweigit/avue](https://gitee.com/smallweigit/avue)
Expand Down
5 changes: 0 additions & 5 deletions mica-mqtt-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
<artifactId>mica-net-http</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@

package net.dreamlu.iot.mqtt.core.server.serializer;

import com.alibaba.fastjson.JSON;
import net.dreamlu.iot.mqtt.core.server.model.Message;
import org.tio.utils.json.JsonUtil;

/**
* fastjson 序列化
*
* @author L.cm
*/
public class FastJsonMessageSerializer implements IMessageSerializer {
public class JsonMessageSerializer implements IMessageSerializer {

@Override
public byte[] serialize(Message message) {
return JSON.toJSONBytes(message);
return JsonUtil.toJsonBytes(message);
}

@Override
public Message deserialize(byte[] data) {
return JSON.parseObject(data, Message.class);
return JsonUtil.readValue(data, Message.class);
}

}

0 comments on commit c783b5c

Please sign in to comment.