Skip to content

Instantly share code, notes, and snippets.

@maiha
Last active November 9, 2016 11:30
Show Gist options
  • Save maiha/9f305fb909fd357eb467 to your computer and use it in GitHub Desktop.
Save maiha/9f305fb909fd357eb467 to your computer and use it in GitHub Desktop.
akka: killとstopとPoisonPillの違い
stop: 現在処理中のメッセージを完了させる。それ以外のMailboxに溜まっているメッセージは処理しない
PoisonPill: メッセージの追加なので、投げた時点でたまっているメッセージが処理される (キュー消化+stop)
kill: ActorKilledExceptionが速攻出る(処理中の動作を破棄?)。その後はsupervisorのstrategyに依存(default:stop)。Mailboxはそのまま残る(restartしたactorが継続)
http://stackoverflow.com/questions/13847963/akka-kill-vs-stop-vs-poison-pill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment