eggjs / eggjs/egg

sofa-node rpc 一个client怎么连接多个服务,这个问题绊了我

Open
#4,340 2 comments 0 reactions 1 assignee Claimed by @gxcsoccer View on GitHub
Inactive
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

```
const rpc = {
client: {
serverHost: '127.0.0.1:12202;127.0.0.1:12204',
responseTimeout: 3000, // responseTimeout(可选): RPC 的超时时长,默认为 3 秒
},
};
```
这是我的配置文件。
同时有端口号12202,12204两个服务,向第二个服务发送请求,第一个服务会报错,报不能再第一个服务上找到方法,说明我只链接了第一个服务,第二个服务是没有被链接上的。怎么解决一个客户端连接多个服务端的问题呢?

这是第一个服务报的错,实际上这个服务是第二个服务
2020-06-03 05:59:29,199 ERROR 1089 nodejs.Error: not found service: com.alipay.sofa.rpc.protobuf.TestService:1.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.