code: protected void subscribeConfig(final AbstractInterfaceConfig config, ConfigListener listener) {
          try {
              if (configObserver == null) { // 初始化
                  configObserver = new ZookeeperConfigObserver();
              }
              configObserver.addConfigListener(config, listener);
              final String configPath = buildConfigPath(rootPath, config);
              // 监听配置节点下 子节点增加、子节点删除、子节点Data修改事件
              PathChildrenCache pathChildrenCache = new PathChildrenCache(zkClient, configPath, true);
              pathChildrenCache.getListenable().addListener(new PathChildrenCacheListener() {
                  @Override
                  public void childEvent(CuratorFramework client1, PathChildrenCacheEvent event) throws Exception {
                      if (LOGGER.isDebugEnabled(config.getAppName())) {
                          LOGGER.debug("Receive zookeeper event: " + "type=[" + event.getType() + "]");
                      }
                      switch (event.getType()) {
                          case CHILD_ADDED: //新增接口级配置
                              configObserver.addConfig(config, configPath, event.getData());
                              break;
                          case CHILD_REMOVED: //删除接口级配置
                              configObserver.removeConfig(config, configPath, event.getData());
                              break;
                          case CHILD_UPDATED:// 更新接口级配置
                              configObserver.updateConfig(config, configPath, event.getData());
                              break;
                          default:
                              break;
                      }
                  }
              });
              pathChildrenCache.start(PathChildrenCache.StartMode.BUILD_INITIAL_CACHE);
              INTERFACE_CONFIG_CACHE.put(configPath, pathChildrenCache);
              configObserver.updateConfigAll(config, configPath, pathChildrenCache.getCurrentData());
          } catch (Exception e) {
              throw new SofaRpcRuntimeException("Failed to subscribe provider config from zookeeperRegistry!", e);
          }
      }
docs: 订阅接口级配置
  
  @param config   provider/consumer config
  @param listener config listener