diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java index 31b2a2c92..ebf7afabb 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java @@ -83,6 +83,11 @@ public class ConfigSubService { return new ClusterListenerJob(params, completionService, memberManager).runJobs(); } + private List runConfigListenerByIpCollectionJob(Map params, + CompletionService completionService) { + return new ClusterListenerByIpJob(params, completionService, memberManager).runJobs(); + } + static class ClusterListenerJob extends ClusterJob { static final String URL = Constants.COMMUNICATION_CONTROLLER_PATH + "/configWatchers"; @@ -93,6 +98,16 @@ public class ConfigSubService { } } + static class ClusterListenerByIpJob extends ClusterJob { + + static final String URL = Constants.COMMUNICATION_CONTROLLER_PATH + "/watcherConfigs"; + + ClusterListenerByIpJob(Map params, CompletionService completionService, + ServerMemberManager serverMemberManager) { + super(URL, params, completionService, serverMemberManager); + } + } + private List runHasCheckListenerCollectionJob(Map params, CompletionService completionService) { return new ClusterCheckHasListenerJob(params, completionService, memberManager).runJobs(); @@ -324,7 +339,7 @@ public class ConfigSubService { SampleResult sampleCollectResult = new SampleResult(); for (int i = 0; i < sampleTime; i++) { - List sampleResults = runConfigListenerCollectionJob(params, completionService); + List sampleResults = runConfigListenerByIpCollectionJob(params, completionService); if (sampleResults != null) { sampleCollectResult = mergeSampleResult(sampleCollectResult, sampleResults); }