Search code examples
scalamessage-passing

Scala message passing order


I've written a Scala program which in it, in a method I send 3 messages to another actor. Can I be sure that these messages are received in destination in order which I sent them?

Thanks in advance for your time.


Solution

  • Akka documentation, Message Delivery Reliability, Discussion: Message Ordering:

    ... for a given pair of actors, messages sent directly from the first to the second will not be received out-of-order.

    Note that there is no guaranteed delivery, so any message can be lost. For instance: sent {1, 2, 3} - received {1, 3}.