Commit acb16012 authored by 宋新宇's avatar 宋新宇

修改

parent 858e68c1
......@@ -37,25 +37,25 @@ public class NovelActiveConsumer implements MessageListener<String, String> {
@Override
public void onMessage(ConsumerRecord<String, String> data) {
long begin = System.currentTimeMillis();
if (log.isInfoEnabled()) {
log.info("media.active.onMessage start, data={}", data == null ? null : data.value());
}
if (data != null) {
try {
BookStoreEvent event = JSON.parseObject(data.value(), BookStoreEvent.class);
if (log.isInfoEnabled()) {
log.info("media.active.topic={}, bookStoreEvent={}", data.topic(), JSON.toJSONString(event));
}
NovelAction action = new NovelAction(event.getClientInfo(), data.value());
executorNovel.execute(action);
} catch (Throwable e) {
log.error("novel.active.onMessage failed, data={}, costTime={} ms", data.value(),
System.currentTimeMillis() - begin, e);
}
}
//long begin = System.currentTimeMillis();
//if (log.isInfoEnabled()) {
// log.info("media.active.onMessage start, data={}", data == null ? null : data.value());
//}
//if (data != null) {
// try {
// BookStoreEvent event = JSON.parseObject(data.value(), BookStoreEvent.class);
// if (log.isInfoEnabled()) {
// log.info("media.active.topic={}, bookStoreEvent={}", data.topic(), JSON.toJSONString(event));
// }
//
// NovelAction action = new NovelAction(event.getClientInfo(), data.value());
//
// executorNovel.execute(action);
// } catch (Throwable e) {
// log.error("novel.active.onMessage failed, data={}, costTime={} ms", data.value(),
// System.currentTimeMillis() - begin, e);
// }
//}
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@ spring:
initialSize: 1
minIdle: 1
redis:
host: r-2zemv0esbjz5tsnmxn.redis.rds.aliyuncs.com
host: r-2zeknwihqn2v6q4x5x.tairpdb.rds.aliyuncs.com
port: 6379
kafka:
bootstrap-servers: 172.17.243.58:9092,172.17.243.59:9092,172.17.243.60:9092,172.17.243.61:9092,172.17.243.62:9092
......@@ -51,7 +51,7 @@ system:
novel:
active:
topic: novelActive
group_id: novel_dy_active
group_id: novel_dy_active_1
management:
health:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment