From ebfc6265380a1cf1f755d7d0954b60f1f1a8d342 Mon Sep 17 00:00:00 2001 From: Pan Li Date: Mon, 4 Feb 2019 08:59:56 -0600 Subject: [PATCH] Fix defect of hystrix stream queue configuration (#3374) * Support 2 config format send-rate and sendRate. * If both given, send-rate will be ignore. Fixes #3359 --- .../cloud/netflix/hystrix/stream/HystrixStreamTask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-cloud-netflix-hystrix-stream/src/main/java/org/springframework/cloud/netflix/hystrix/stream/HystrixStreamTask.java b/spring-cloud-netflix-hystrix-stream/src/main/java/org/springframework/cloud/netflix/hystrix/stream/HystrixStreamTask.java index 28f14affe..32cbba0c7 100644 --- a/spring-cloud-netflix-hystrix-stream/src/main/java/org/springframework/cloud/netflix/hystrix/stream/HystrixStreamTask.java +++ b/spring-cloud-netflix-hystrix-stream/src/main/java/org/springframework/cloud/netflix/hystrix/stream/HystrixStreamTask.java @@ -89,7 +89,7 @@ public class HystrixStreamTask implements ApplicationContextAware { } // TODO: use integration to split this up? - @Scheduled(fixedRateString = "${hystrix.stream.queue.sendRate:500}") + @Scheduled(fixedRateString = "${hystrix.stream.queue.sendRate:${hystrix.stream.queue.send-rate:500}}") public void sendMetrics() { ArrayList metrics = new ArrayList<>(); this.jsonMetrics.drainTo(metrics); @@ -117,7 +117,7 @@ public class HystrixStreamTask implements ApplicationContextAware { } } - @Scheduled(fixedRateString = "${hystrix.stream.queue.gatherRate:500}") + @Scheduled(fixedRateString = "${hystrix.stream.queue.gatherRate:${hystrix.stream.queue.gather-rate:500}}") public void gatherMetrics() { try { // command metrics