-
-
Notifications
You must be signed in to change notification settings - Fork 84
Description
- 我已经检查过discussions
- 我已经搜索过issues
- 我已经仔细检查过FAQ
描述bug
在通过ConfigService.getConfig传入一个不存在的namespace后,看了下代码目前是会自动定时执行trySync,然后会不停地打印如下warn日志:
Sync config failed, will retry. Repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository, reason: Load Apollo Config failed - appId: xxapp, cluster: default, namespace: messages-en, url: http://x.x.x.x:8080/configs/xxapp/default/messages-en [Cause: ApolloConfigStatusCodeException([status code: 404] Could not find config for namespace - appId: xxapp, cluster: default, namespace: messages-en, please check whether the configs are released in Apollo!)]
想咨询下我是否有办法控制找不到的namespace不要自动进行trySync?
描述下我们的使用场景:我们希望使用apollo做spring-boot-i18n的配置管理,即将每种语言的messages文件作为namespace配置到apollo中。目前的实现是会有一个fallback机制,例如如果找不到messages-zh_CN就尝试找messages-zh,但是目前发现会不停地对找不到的namespace进行trySync。所以想问下这种机制是否有参数进行控制?或者我是否有办法直接根据appId获取所有可见(或私有)的namespace列表?
复现
使用ConfigService.getConfig(appId, namespace)方法,传入一个不存在的namespace,会不停trySync,然后打印WARN级别的Sync config failed日志
期望
期望:是否有办法控制找不到的namespace不要进行trySync?或者是否有api能够获取appId下的所有可见或私有的namespace列表?
额外的细节和日志
- 版本:2.4.0