petabridge / akka-bootcamp

Self-paced training course to learn Akka.NET fundamentals from scratch
http://learnakka.net/
Apache License 2.0
1.04k stars 1.57k forks source link

end of unit 2 (stash , unstash) #292

Open sabbadino opened 5 years ago

sabbadino commented 5 years ago

in https://github.com/petabridge/akka-bootcamp/blob/master/src/Unit-2/lesson5/README.md

We call Stash.Unstash() to pop off the message at the top of the Stash. SHOULD BE We call Stash.Unstash() to pop off the oldest message message at the top of the Stash.

skydvr commented 5 years ago

But if I understand in correctly, Stash.Stash() specifically doesn't pop off the oldest message - it pops off the last message placed on the stash. To have the "oldest" message (first message placed on the stash) processed first by the actor, you'd have to use UnstashAll(), which preserves the FIFO ordering of the stash.