-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message Order Guaranteed? #140
Comments
In the current implementation messages should always arrive in the order they are sent. But, if I understand correctly, Riker (the project) itself does not guarantee any messaging order, which means that you should not rely on a guaranteed message order because it could change in the future. Maybe @leenozara can say a bit more about this topic. For the future it would be nice if we could provide this guarantee, so that people can rely on causal message ordering. |
Thanks. I'm glad the order is maintained in the current implementation. I would be nice if the project would consider providing this guarantee. |
Message order is guaranteed by sender-receiver pair. Messages sent by ActorA to ActorB will not be received out of order. This is implicit from guarantees 2 and 3 in https://riker.rs/actors/#message-guarantees. I.e. An actor instance handles only one message at a time, so it can only place a message on a receiving actor's mailbox one at a time. Actors process the messages in the order they are received. This only applies to user-level messages. System messages are processed ahead of user messages, but they too are processed in the order they are received. Riker message guarantees are per Actor System (local only). We will keep these guarantees but they won't be extended to remote systems when we introduce remoting. |
If you have a system with two actors, A and B. Actor A is repeatedly sending messages very quickly to Actor B. Will Actor B always receive the messages in the same order Actor A sent them? For example, sending messages 1,2,3,4,5 from Actor A to Actor B where 1 is sent first and 5 is sent last. Does Riker guarantee Actor B to receive 1,2,3,4,5 and not 1,2,4,3,5?
The text was updated successfully, but these errors were encountered: