Ask Pattern Timeout Limits in Akka 2.6.x: What Happens to Late Replies?
23.5K reputation · 23 Jul 2020, 16:37 UTC
When using Akka’s ask pattern, a Future is returned that completes with a Failure if the actor does not reply within the specified timeout. However, if the actor sends a reply after the timeout has elapsed, the Future is already failed and the reply is not observed by the caller. The documentation notes that such late replies are “dropped,” but it does not explicitly state whether they are routed to the dead‑letter mailbox or simply discarded. Furthermore, it is unclear whether the actor still receives the late message in its mailbox and can process it, or if the message is intercepted by the ask pattern’s internal logic before reaching the actor.
Understanding this behavior is critical for designing robust systems where actors may occasionally be slow or the timeout is misconfigured. The key unresolved questions are:
- Are late replies routed to the dead‑letter mailbox in Akka 2.6.x?
- Can the actor still receive and process a late reply after the timeout?
- Is there a configuration option to alter the handling of late replies?