增加nett传输日志
This commit is contained in:
+3
@@ -2,6 +2,7 @@ package com.tongran.agent.server.rockermq.listener;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.tongran.agent.server.core.enums.MsgEnum;
|
||||||
import com.tongran.agent.server.core.session.SessionManager;
|
import com.tongran.agent.server.core.session.SessionManager;
|
||||||
import com.tongran.agent.server.netty.annotation.AgentDispatcher;
|
import com.tongran.agent.server.netty.annotation.AgentDispatcher;
|
||||||
import com.tongran.agent.server.netty.basics.AgentDispatcherManager;
|
import com.tongran.agent.server.netty.basics.AgentDispatcherManager;
|
||||||
@@ -39,6 +40,8 @@ public class AgentConsumerDownListener implements RocketMQListener<String> {
|
|||||||
if (ObjectUtil.isNotEmpty(msgHandler)) {
|
if (ObjectUtil.isNotEmpty(msgHandler)) {
|
||||||
String msg = msgHandler.downHandle(dto.getData(), dto.getClientId());
|
String msg = msgHandler.downHandle(dto.getData(), dto.getClientId());
|
||||||
Message chargeMessage = Message.builder().clientId(dto.getClientId()).dataType(dto.getDataType()).data(msg).build();
|
Message chargeMessage = Message.builder().clientId(dto.getClientId()).dataType(dto.getDataType()).data(msg).build();
|
||||||
|
AssertLog.info("连接是否存在:{},clientId:{},session:{}",
|
||||||
|
Objects.nonNull(sessionManager.getSessionById(dto.getClientId())), dto.getClientId(), sessionManager.getSessionById(dto.getClientId()));
|
||||||
if (Objects.nonNull(sessionManager.getSessionById(dto.getClientId()))) {
|
if (Objects.nonNull(sessionManager.getSessionById(dto.getClientId()))) {
|
||||||
sessionManager.writeAndFlush(sessionManager.getSessionById(dto.getClientId()).getChannel(), chargeMessage);
|
sessionManager.writeAndFlush(sessionManager.getSessionById(dto.getClientId()).getChannel(), chargeMessage);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user