dubbo:config-center

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 127.0.0.1:2181;
2. If protocol is not specified, address is set to zookeeper://127.0.0.1:2181
2.7.0+
addressconfig.addressstringrequiredConfiguration center address.
See protocol description for values
2.7.0+
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
2.7.0+
clusterconfig.clusterstringoptionalThe meaning varies according to the configuration center selected.
For example, it’s used to distinguish between different configuration clusters in apollo
2.7.0+
groupconfig.groupstringoptionaldubboThe meaning varies according to the configuration center selected.
nacos - Isolate different configuration sets
zookeeper - Isolate different configuration sets
2.7.0+
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
2.7.0+
timeoutconfig.timeoutinteger3000msGets the configured timeout2.7.0+
usernamestringthe username if the configuration center requires validation
Apollo is not yet enabled
2.7.0+
passwordstringpassword if configuration center needs to do check
Apollo is not yet enabled
2.7.0+
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
2.7.0+

Last modified December 22, 2020: clean up website (6e41905afab)