gurghet
gurghet

Reputation: 7707

Transitive ordering of messages in Akka Actors

Is there any simple way to enforce transitive ordering of messages in Akka?

For example I have

How do I ensure C gets (or interprets) M1 before M2 in a simple way?

Upvotes: 1

Views: 55

Answers (1)

Tim
Tim

Reputation: 27356

There are a few of ways you could do this:

  1. Have C send a reply to A when it receives M1 and delay sending M2 to B before the reply is received.

  2. Send M2 to C and have C forward it to B

  3. Put a flag in M2 to say that it depends on M1 and have C stash M2 if it arrives before M1

Upvotes: 3

Related Questions