【发布时间】:2014-05-09 16:04:02
【问题描述】:
假设我有一个 IO Actor connection 能够通过 TCP 发送和接收消息。在我的演员中,我要求连接的另一端做出回应:
connection.ask(ByteString("stuff")).collect {
case Received(response) => log.debug(response.utf8String)
}
似乎使用此代码,未来的询问超时,而是包含演员在询问模式之外接收原始消息。
你可以对 Akka IO Actor 使用 ask 模式吗?如果没有,为什么不呢?
【问题讨论】: