|
|
@@ -35,11 +35,15 @@ public class RabbitListeners {
|
|
|
exchange = @Exchange(value = "amq.direct"))
|
|
|
)
|
|
|
public void accessLogConsumer(@Payload String msg) {
|
|
|
- GatewayLog gatewayLog = JsonConverter.jsonToObject(msg, GatewayLog.class);
|
|
|
- logHandler.pushGatewayLog(gatewayLog);
|
|
|
- //log.info("{} -> {}", gatewayLog.getRequestId(), gatewayLog.getRequestUrl());
|
|
|
- AccessLog accessLog = new AccessLog(gatewayLog);
|
|
|
- accessLogMongo.save(accessLog);
|
|
|
+ try {
|
|
|
+ GatewayLog gatewayLog = JsonConverter.jsonToObject(msg, GatewayLog.class);
|
|
|
+ logHandler.pushGatewayLog(gatewayLog);
|
|
|
+ //log.info("{} -> {}", gatewayLog.getRequestId(), gatewayLog.getRequestUrl());
|
|
|
+ AccessLog accessLog = new AccessLog(gatewayLog);
|
|
|
+ accessLogMongo.save(accessLog);
|
|
|
+ } catch (Exception e) {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@RabbitListener(bindings =@QueueBinding(
|