消费改造
This commit is contained in:
@@ -29,15 +29,12 @@ public class MqttConnectStatusListener2 implements IMqttConnectStatusListener {
|
||||
@Override
|
||||
public void online(ChannelContext context, String clientId, String username) {
|
||||
//设备上线不做任何处理,只有心跳报文做处理
|
||||
log.info("online-context: {}", context);
|
||||
log.info("设备:{}上线", clientId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void offline(ChannelContext context, String clientId, String username, String reason) {
|
||||
log.info("offline-context: {}", context);
|
||||
redisService.deleteObject(CacheConstants.EQUIPMENT_HEARTBEAT + clientId);
|
||||
log.info("设备:{}离线,offline reason:{}.", clientId, reason);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ spring:
|
||||
name: mica-mqtt-server
|
||||
# 环境 dev|test|prod
|
||||
profiles:
|
||||
active: dev
|
||||
# active: prod
|
||||
# active: dev
|
||||
active: prod
|
||||
messages:
|
||||
encoding: UTF-8
|
||||
basename: i18n/messages
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
<gson.version>2.13.2</gson.version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>mqtt-xf-receiver</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- 使用 Spring Boot 3 的依赖管理 -->
|
||||
|
||||
Reference in New Issue
Block a user