Commit 3d587fe7 by 罗长华

RPC调用失败后,尝试本地发送

parent b1c42e32
...@@ -168,6 +168,7 @@ public class ChannelSender { ...@@ -168,6 +168,7 @@ public class ChannelSender {
routerSendService.sendMsgRemote(toClientId, clientChannelInfo.getPlatform(), msgJson); routerSendService.sendMsgRemote(toClientId, clientChannelInfo.getPlatform(), msgJson);
} catch (RpcException exception) { } catch (RpcException exception) {
// do nothing is ok // do nothing is ok
tryFindAndSendAndRefresh(toClientId, clientChannelInfo.getPlatform(), msgJson);
log.info("rpc 调用异常 {} ", JSON.toJSONString(clientChannelInfo)); log.info("rpc 调用异常 {} ", JSON.toJSONString(clientChannelInfo));
} }
} }
...@@ -176,6 +177,20 @@ public class ChannelSender { ...@@ -176,6 +177,20 @@ public class ChannelSender {
} }
/** /**
*
* @Author luozh
* @Date 2022年05月24日 05:30:50
* @param toClientId
* @param platform
* @param msg
* @Return
*/
public void tryFindAndSendAndRefresh(Long toClientId, Integer platform, String msg) {
log.info("触发tryFindAndSendAndRefresh {} {}", toClientId, platform);
this.sendMsgLocal(toClientId, platform, msg);
}
/**
* 本地直接下发,限定本机有的channel * 本地直接下发,限定本机有的channel
* *
* @param nioSocketChannel * @param nioSocketChannel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment