From f3eb94a0ec8274af7f3a1293ee0d2e764030c631 Mon Sep 17 00:00:00 2001 From: zhongjie Date: Tue, 24 Nov 2020 18:42:35 +0800 Subject: [PATCH] 1.add subscribe for access stat channel to really send data 2.set stat.open true to open push access stat data --- src/main/java/we/plugin/stat/StatPluginFilter.java | 2 +- src/main/resources/application.yml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/we/plugin/stat/StatPluginFilter.java b/src/main/java/we/plugin/stat/StatPluginFilter.java index 8eb25d6..c682faf 100644 --- a/src/main/java/we/plugin/stat/StatPluginFilter.java +++ b/src/main/java/we/plugin/stat/StatPluginFilter.java @@ -112,7 +112,7 @@ public class StatPluginFilter extends PluginFilter { b.append(Constants.Symbol.RIGHT_BRACE); if (StringUtils.isBlank(fizzAccessStatTopic)) { - rt.convertAndSend(fizzAccessStatChannel, b.toString()); + rt.convertAndSend(fizzAccessStatChannel, b.toString()).subscribe(); } else { log.info(b.toString(), LogService.HANDLE_STGY, LogService.toKF(fizzAccessStatTopic)); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 9ecca22..f9a03bc 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -78,4 +78,8 @@ aggr-webclient: fizz-web-client: timeout: 20000 log: - headers: COOKIE,FIZZ-APPID,FIZZ-SECRETKEY,FIZZ-SIGN,FIZZ-TS,FIZZ-RSV \ No newline at end of file + headers: COOKIE,FIZZ-APPID,FIZZ-SECRETKEY,FIZZ-SIGN,FIZZ-TS,FIZZ-RSV + +stat: + # switch for push access stat data + open: true \ No newline at end of file