dubbo:config-center element

Configuration center. Corresponding configuration class: org.apache.dubbo.config.ConfigCenterConfig

propertyCorresponding URL parametertyperequireddefault valuedescriptioncompatibility
protocolconfig.protocolstringoptionalzookeeperWhich configuration center to use: apollo, zookeeper, nacos, etc.
take zookeeper for example
1. If protocol is specified, address can be simplified to;
2. If protocol is not specified, address is set to zookeeper://
addressconfig.addressstringrequiredConfiguration center address.
See protocol description for values
highest-priorityconfig.highestPrioritybooleanoptionaltrueConfiguration items from the configuration center have the highest priority, it means that the local configuration items will be overwritten.2.7.0+
namespaceconfig.namespacestringoptionaldubboUsing for multi-tenant isolation generally, the actual meaning varies depending on the configuration center.
For example:
zookeeper - Environment isolation, default dubbo
apollo - Distinguish between sets of configurations for different domains and use them by default dubbo and application
clusterconfig.clusterstringoptionalThe meaning varies according to the configuration center selected.
For example, it’s used to distinguish between different configuration clusters in apollo
groupconfig.groupstringoptionaldubboThe meaning varies according to the configuration center selected.
nacos - Isolate different configuration sets
zookeeper - Isolate different configuration sets
checkconfig.checkbooleanoptionaltrueWhether to terminate application startup when the configuration hub connection fails.2.7.0+
config-fileconfig.configFilestringoptionaldubbo.propertiesThe key mapped to the global level profile
zookeeper - $DEFAULT_PATH/dubbo/config/dubbo/dubbo.properties
apollo - The dubbo.properties key in dubbo namespace
timeoutconfig.timeoutinteger3000msGets the configured timeout2.7.0+
usernamestringthe username if the configuration center requires validation
Apollo is not yet enabled
passwordstringpassword if configuration center needs to do check
Apollo is not yet enabled
parametersMap<string, string>Extended parameters to support customized configuration parameters for different configuration centers2.7.0+
include-spring-envbooleanoptionalfalseWith the Spring framework support, when the value is true, it will automatically reads the configuration from the Spring Environment
Read by default
Configuration with key dubbo.properties
PropertySource with key dubbo.properties