dubbo:registry element

The configuration of the registry center. The corresponding class is org.apache.dubbo.config.RegistryConfig. If you have multiple different registries, you can declare multiple <dubbo:registry> tags, and then reference specified registry with registry property in <dubbo:service> or <dubbo:reference> tag.

AttributeCorresponding URL parameterTypeRequiredDefault ValueFunctionDescriptionCompatibility
idstringFalseConfiguration associationBean Id of the registry center, can be referenced in <dubbo:service registry="">or <dubbo:reference registry="">Above 1.0.16
address<host:port>stringTrueService discoveryThe address of the registry center. If the address has no port, default port 9999 will be adopted. Multiple addresses within the same cluster use , to seperate, such as ip:port,ip:port. Multiple registries within different cluster, please configure different dubbo:registry tag.Above 1.0.16
protocol<protocol>stringFalsedubboService discoveryThe protocol of the registry center. dubbo, multicast, zookeeper, redis, consul(2.7.1), sofa(2.7.2), etcd(2.7.2), nacos(2.7.2) are available.Above 2.0.0
port<port>intFalse9090Service discoveryThe default port of the registry. When the address has no port, this default port will be adopted.Above 2.0.0
username<username>stringFalseService governanceThe usename of the registry. Do not set it if the registry doesn’t need validation.Above 2.0.0
password<password>stringFalseService governanceThe password of the registry. Do not set it if the registry doesn’t need validation.Above 2.0.0
transportregistry.transporterstringFalsenettyPerformance optimizemina, netty are available.Above 2.0.0
timeoutregistry.timeoutintFalse5000Performance optimizeThe timeout(ms) of the request to registry.Above 2.0.0
sessionregistry.sessionintFalse60000Performance optimizeThe session timeout(ms) of the registry. It’s used to check whether the providers are alive. It depends on the implement of the registry. For example, for HeartBeat implement, the timeout is the interval of two heart beats.Above 2.1.0
fileregistry.filestringFalseService governanceThe local file to cache the address list of registries and providers. When application restarts, it will restore the registries and providers. Please use different file for different registy.Above 2.0.0
waitregistry.waitintFalse0Performance optimizeStop wait for a notice completion time (ms)Above 2.0.0
checkcheckbooleanFalsetrueService governanceWhether throwing exception while the registry isn’t existed.Above 2.0.0
registerregisterbooleanFalsetrueService governancewhether registering to the registry center. If false, just subscribing, not registering.Above 2.0.5
subscribesubscribebooleanFalsetrueService governancewhether subscribing from the registry center. If false, just registering, not subscribing.Above 2.0.5
dynamicdynamicbooleanFalsetrueService governanceWhether the service is registered dynamically. If false, services will be showed as disable, you need to enable it manually. And you also need to disable it when provider shut down.Above 2.0.5
groupgroupstringFalsedubboService governanceService registration grouping, cross-group services will not affect each other, and can not be called each other, suitable for environmental isolation.Above 2.0.5
simplifiedsimplifiedbooleanFalsefalseService governanceRegistered with the registry URL whether to adopt the lean mode (compatible with low version)Above 2.7.0
extra-keysextraKeysstringFalseService governanceIn simplified = true, extraKeys allows you to outside the default arguments put additional key in the URL, format: “interface, key1, key2”.Above 2.7.0