diff --git a/austin-handler/src/main/java/com/java3y/austin/handler/receiver/kafka/ReceiverStart.java b/austin-handler/src/main/java/com/java3y/austin/handler/receiver/kafka/ReceiverStart.java index 0ba8242..3ba8f00 100644 --- a/austin-handler/src/main/java/com/java3y/austin/handler/receiver/kafka/ReceiverStart.java +++ b/austin-handler/src/main/java/com/java3y/austin/handler/receiver/kafka/ReceiverStart.java @@ -36,9 +36,6 @@ public class ReceiverStart { @Autowired private ConsumerFactory consumerFactory; - @Value("${austin.nacos.enabled}") - private Boolean nacosEnabled; - /** * receiver的消费方法常量 */ @@ -59,13 +56,7 @@ public class ReceiverStart { */ @PostConstruct public void init() { - int total = groupIds.size(); - if (nacosEnabled) { - // 当nacos开启时 会导致Receiver提前加载 所以这里getBean次数-1 - // nacos issue: https://github.com/nacos-group/nacos-spring-project/issues/249 - total -= 1; - } - for (int i = 0; i < total; i++) { + for (int i = 0; i < groupIds.size(); i++) { context.getBean(Receiver.class); } } diff --git a/pom.xml b/pom.xml index 141317c..4714d02 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ com.alibaba.boot nacos-config-spring-boot-starter - 0.2.1 + 0.2.12