Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc_server不支持订阅数据 #18

Open
LeoYang06 opened this issue Sep 9, 2020 · 5 comments
Open

rpc_server不支持订阅数据 #18

LeoYang06 opened this issue Sep 9, 2020 · 5 comments

Comments

@LeoYang06
Copy link

rpc_server不支持订阅数据么?客户端和服务端实现双工通信,rpc_client支持发布订阅,rpc_server怎么实现订阅呢?

@qicosmos
Copy link
Owner

qicosmos commented Sep 9, 2020

为什么服务端要订阅,它订阅来自哪里的数据?

@LeoYang06
Copy link
Author

现在的发布订阅使用方式是:rpc_server发布数据,rpc_client订阅数据,和我印象中的消息中间件的顺序相反(rpc_client发布数据,rpc_server订阅数据),按照现有方式也没有问题,但我发现rpc_client中有publish接口,rpc_client发布的数据由谁去订阅呢?谢谢指教。

@qicosmos
Copy link
Owner

qicosmos commented Sep 9, 2020

A客户端订阅主题a,B向服务器发布a,服务器publish这个a,A就可以收到来自B发布的消息了。

@LeoYang06
Copy link
Author

A客户端订阅主题a,B向服务器发布a,服务器publish这个a,A就可以收到来自B发布的消息了。

不太明白,这里的B是指的rpc_client还是rpc_server?

@qicosmos
Copy link
Owner

B可以是一个客户端,也可以是服务器端的一个业务对象,它们最终都会调用server提供的publish接口去发布消息。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants