Skip to end of metadata
Go to start of metadata
静态服务
(+) (#)
| 有时候希望人工管理服务提供者的上线和下线,此时需将注册中心标识为非动态管理模式。 |
< dubbo:registry address = "10.20.141.150:9090" dynamic = "false" />
|
或者:
< dubbo:registry address = "10.20.141.150:9090?dynamic=false" />
|
服务提供者初次注册时为禁用状态,需人工启用,断线时,将不会被自动删除,需人工禁用。
如果是一个第三方独立提供者,比如memcached等,可以直接向注册中心写入提供者地址信息,消费者正常使用:
(通常由脚本监控中心页面等调用)
RegistryFactory registryFactory = ExtensionLoader.getExtensionLoader(RegistryFactory. class ).getAdaptiveExtension();
Registry registry = registryFactory.getRegistry(URL.valueOf( "zookeeper://10.20.153.10:2181" ));
registry.register(URL.valueOf( "memcached://10.20.153.11/com.foo.BarService?category=providers&dynamic=false&application=foo" ));
|
0 Comments
comments.show.hideAnonymous replies:
Help Tips
*bold*
bold_italic_
italich1.
Large headingh5.
Small heading*
Bulleted point#
Numbered point