新增业务流量上报

This commit is contained in:
gaoyutao
2026-03-10 17:51:35 +08:00
parent 7bd91aa14f
commit b52f56e2e9
2 changed files with 18 additions and 0 deletions
@@ -43,6 +43,8 @@ public enum MsgEnum {
网络上报重试("NET_RECOVER"),
业务网络上报("BUSINESS_NET"),
挂载上报("POINT"),
系统其他上报("OTHER_SYSTEM"),
@@ -231,6 +231,22 @@ public class AgentEndpoint {
}
}
@AgentDispatcher(msgId = MsgEnum.业务网络上报)
public class BusinessNetHandler implements AgentHandler {
@Override
public UpMsgResponse upHandle(String data, String clientId) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("clientId", clientId);
jsonObject.put("dataType", MsgEnum.业务网络上报.getValue());
jsonObject.put("data", data);
MqMsg mqMsg = MqMsg.builder().topic(agentMqConfig.getAgentTopic()).content(jsonObject.toString()).build();
agentProducer.asyncSend(mqMsg);
JSONObject json = new JSONObject();
json.put("resCode",1);
return UpMsgResponse.builder().clientId(clientId).dataType(MsgEnum.采集上报应答.getValue())
.content(json.toString()).build();
}
}
@AgentDispatcher(msgId = MsgEnum.挂载上报)
public class PointHandler implements AgentHandler {
@Override