Reputation: 7707
Is there any simple way to enforce transitive ordering of messages in Akka?
For example I have
A
sending M1
to C
A
sending M2
to B
B
forwards M2
to C
How do I ensure C
gets (or interprets) M1
before M2
in a simple way?
Upvotes: 1
Views: 55
Reputation: 27356
There are a few of ways you could do this:
Have C
send a reply to A
when it receives M1
and delay sending M2
to B
before the reply is received.
Send M2
to C
and have C
forward it to B
Put a flag in M2
to say that it depends on M1
and have C
stash M2
if it arrives before M1
Upvotes: 3