|
|
@@ -2,8 +2,6 @@ package cn.reghao.tnb.message.app.rabbit.listener;
|
|
|
|
|
|
import cn.reghao.jutil.jdk.serializer.JsonConverter;
|
|
|
import cn.reghao.tnb.message.api.dto.msg.BaseMessage;
|
|
|
-import cn.reghao.tnb.message.app.model.po.AccessLog;
|
|
|
-import cn.reghao.tnb.message.app.model.po.RuntimeLog;
|
|
|
import cn.reghao.tnb.message.app.service.MessageConsumer;
|
|
|
import cn.reghao.tnb.message.app.ws.WsConnection;
|
|
|
import cn.reghao.tnb.message.app.ws.msg.ChatPayload;
|
|
|
@@ -71,24 +69,4 @@ public class RabbitListeners {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- @RabbitListener(bindings =@QueueBinding(
|
|
|
- value = @Queue(value = "tnb.log.access", durable = "true"),
|
|
|
- key = "tnb.log.access",
|
|
|
- exchange = @Exchange(value = "amq.direct"))
|
|
|
- )
|
|
|
- public void accessLogConsumer(@Payload String msg) {
|
|
|
- AccessLog accessLog = JsonConverter.jsonToObject(msg, AccessLog.class);
|
|
|
- //log.info("{} -> {}", accessLog.getRequestId(), accessLog.getRequestUrl());
|
|
|
- }
|
|
|
-
|
|
|
- @RabbitListener(bindings =@QueueBinding(
|
|
|
- value = @Queue(value = "tnb.log.runtime", durable = "true"),
|
|
|
- key = "tnb.log.runtime",
|
|
|
- exchange = @Exchange(value = "amq.direct"))
|
|
|
- )
|
|
|
- public void runtimeLogConsumer(@Payload String msg) {
|
|
|
- RuntimeLog runtimeLog = JsonConverter.jsonToObject(msg, RuntimeLog.class);
|
|
|
- //log.info("{} -> {}:{}", runtimeLog.getApp(), runtimeLog.getApp(), runtimeLog.getHost());
|
|
|
- }
|
|
|
}
|