dubbo:protocol register attribute not work
Environment
- Dubbo version: 2.7.3
- Operating System version: CentOS7
- Java version: 1.8
Steps to reproduce this issue
- Set two protocal, with different "register" attribute
<dubbo:protocol name="dubbo" port="8751" register="true" />
<dubbo:protocol name="hessian" port="8752" register="false" />
- use the zookeeper registry center
<dubbo:registry address="..." file="./.dubbo_cache" />
- start the server and view the provider in zkCli
Expected Result
only the dubbo is registed
Actual Result
the dubbo and hession protocol are registed
It looks like you are reading from the local cache, is this the first time you start it?
It looks like you are reading from the local cache, is this the first time you start it?
file="./.dubbo_cache"
此设置是修改默认的cache文件位置,默认值在用户Home目录下
当客户端失去注册中心联系时,会是用此缓存数据尝试连接
此设置与服务注册无关,无论改不改都会有cache文件产生
Can confirm the issue. I used dubbo-samples-zookeeper with dubbo.application.name=zookeeper-demo-provider (without caching) and 2 protocols (hessian was configured with setRegister(false)). Got the same result: in zookeeper dir dubbo://172.25.26.102:20880 and hessian://172.25.26.102:20881 both present have register=true. Actually, I am not able to find any usage of using neither ProtocolConfig::isRegister nor RegistryConfig::isRegister in dubbo source code (except tests).