dubbo优雅停机:
背景:dubbo消费者请求时候,遭遇 停机发布 (springboot) :on consumer 10.0.xxx.xxx use dubbo version 2.6.0 is DESTROYED, can not be invoked any more
销毁流程:
com.alibaba.dubbo.config.ProtocolConfig#destroyAll
注册中心删除server节点 :Registry
AbstractRegistryFactory.destroyAll()
协议/流程:Protocol
ExtensionLoader<Protocol> loader = ExtensionLoader.getExtensionLoader(Protocol.class);
Iterator i$ = loader.getLoadedExtensions().iterator();
while(i$.hasNext()) {
String protocolName = (String)i$.next();
try {
Protocol protocol = (Protocol)loader.getLoadedExtension(protocolName);
if (protocol != null) {
protocol.destroy();
}
} catch (Throwable var4) {
logger.warn(var4.getMessage(), var4);
}
}