Skip to content

zk配置中心的APP级别条件路由不生效 #500

@fllife

Description

@fllife

zk注册中心的条件路由 和 dubbo2.7.3读取条件路由 的path不一致导致条件路由不生效

zk注册中心生成条件路由的path:dubbo/config/${app}/condition-router

    private String getPath(String key, String type) {
        key = key.replace("/", "*");
        if (type.equals(Constants.CONDITION_ROUTE)) {
            return prefix + Constants.PATH_SEPARATOR + key + Constants.PATH_SEPARATOR + "condition-router";
        } else {
            return prefix + Constants.PATH_SEPARATOR + key + Constants.PATH_SEPARATOR + "tag-router";
        }
    }

dubbo2.7.3读取条件路由path为:/dubbo/config/dubbo/${app}.condition-router

 private String getPathKey(String group, String key) {
        return rootPath + PATH_SEPARATOR + group + PATH_SEPARATOR + key;
    }

zk生成条件路由路径和dubbo读取条件路由路径不一致,导致配置未生效

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions