thrownewIllegalStateException("Failed to unregister "+url+" to registry "+getUrl().getAddress()+", cause: "+t.getMessage(),t);
}else{
logger.error("Failed to uregister "+url+", waiting for retry, cause: "+t.getMessage(),t);
}
// 将失败的取消注册请求记录到失败列表,定时重试
failedUnregistered.add(url);
}
}
...
...
@@ -169,21 +187,30 @@ public abstract class FailbackRegistry extends AbstractRegistry {
try{
// 向服务器端发送订阅请求
doSubscribe(url,listener);
}catch(Exceptiont){
// 将失败的订阅请求记录到失败列表,定时重试
addFailedSubscribed(url,listener);
}catch(Exceptione){
Throwablet=e;
List<URL>urls=getCacheUrls(url);
if(urls!=null&&urls.size()>0){
notify(url,listener,urls);
logger.error("Failed to subscribe "+url+", Using cached list: "+urls+" from cache file: "+getUrl().getParameter(Constants.FILE_KEY,System.getProperty("user.home")+"/dubbo-registry-"+url.getHost()+".cache")+", cause: "+t.getMessage(),t);