Say we two actors called
parent is watching for signals, like
tell to send a message to
child and the
child message handling logic sends back a response and then immediately blows up due to an exception at the end of its handler logic then I believe
parent is guaranteed to see the response message before it sees the
Is this ordering (between message and signal) also guaranteed if the
parent sends its original message using
Why would I think
ask might make a difference?
My understanding is that when using
ask, the system essentially creates a temporary actor between
child (we see that
ask fills in the
ActorRef in the request rather than it being filled in by the caller). So, I’m wondering if, in the failure situation described, the response might go to this temporary actor and the signal might go directly to the
parent, i.e. the message and the signal might follow different paths and the asynchronous nature of everything might mean that the temporary actor introduces a delay that results in its message ending up in the
parent inbox after the directly delivered signal?
Or are things done in such a way to avoid these kinds of problems, e.g. the temporary actor, created by the
ask, somehow acts as a filter/router on the
parent inbox and so will never change message/signal ordering relative to what would have occurred if it had not been intermediating things?