Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法实现“即发即弃”异步 thrift 方法调用,客户端只是发送信息并忘记它。无需等待响应或响应回调。有点像消息队列,只是没有队列。有什么办法可以通过节俭来做到这一点?
是的,只需添加oneway到方法定义中。当然,单向方法必须返回void:
oneway
void
service MyService { //returns immediately oneway void onewayMethod(<params>); //blocks until completion void normalMethod(<params>); }