且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Thrift 中使用不同的线程池处理请求?

更新时间:2023-11-13 17:57:10

是的,使用 Multiplex 协议 随 Thrift 0.9.1 引入.它允许多个服务共享相同的传输.请注意,服务器和客户端都必须使用 Multiplex 协议层才能成功.

Yes, use the multiplex protocol introduced with Thrift 0.9.1. It allows having multiple services sharing the same transport. Note that both server and client must use the multiplex protocol layer to succeed.

顺便说一下,考虑使异步方法成为单向:

By the way, consider making the async method a oneway:

Service whatever {
  oneway void processAsync(1: Request req) 
}