...
|
...
|
@@ -43,7 +43,6 @@ public class StandardMqListener extends AbstractMqListener implements ChannelAwa |
|
|
process(this, message);
|
|
|
long nowTimeMillis = System.currentTimeMillis();
|
|
|
publisher.publishEvent(new SearchLogsEvent("MqListener", EventReportEnum.STANDARDMQLISTENER_ONMESSAGE.getMoudleName(), "monitor", nowTimeMillis + ""));
|
|
|
// 记录上报的日志
|
|
|
SEARCH_EVENT_LOG.info("report to influxDb,currentTimeMillis is [{}],EventName is [{}] ,MoudleName is [{}]", nowTimeMillis, "MqListener", "consumer");
|
|
|
} catch (Exception e) {
|
|
|
publisher.publishEvent(new SearchEvent(EventReportEnum.STANDARDMQLISTENER_ONMESSAGE.getEventName(), EventReportEnum.STANDARDMQLISTENER_ONMESSAGE.getFunctionName(),
|
...
|
...
|
@@ -53,6 +52,7 @@ public class StandardMqListener extends AbstractMqListener implements ChannelAwa |
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void updateData(final Map data, final String indexName, final String key) {
|
|
|
long begin = System.currentTimeMillis();
|
|
|
Standard standard = new Standard();
|
...
|
...
|
@@ -61,16 +61,17 @@ public class StandardMqListener extends AbstractMqListener implements ChannelAwa |
|
|
return;
|
|
|
}
|
|
|
standardService.saveOrUpdate(standard);
|
|
|
logger.info("[func=updateData][step=success][tableName=standard][id={}][cost={}ms]", standard.getId(), (System.currentTimeMillis() - begin));
|
|
|
logger.info("[func=updateData][id={}][cost={}ms]", standard.getId(), (System.currentTimeMillis() - begin));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void deleteData(final String id, final String indexName, final String key) {
|
|
|
if (StringUtils.isBlank(id)) {
|
|
|
return;
|
|
|
}
|
|
|
long begin = System.currentTimeMillis();
|
|
|
standardService.delete(Integer.valueOf(id));
|
|
|
logger.info("[func=deleteData][step=success][tableName=standard][id={}][cost={}ms]", id, (System.currentTimeMillis() - begin));
|
|
|
logger.info("[func=deleteData][id={}][cost={}ms]", id, (System.currentTimeMillis() - begin));
|
|
|
}
|
|
|
|
|
|
@Override
|
...
|
...
|
|