Skip to content

Instantly share code, notes, and snippets.

@uarun
Last active January 3, 2016 11:29
Show Gist options
  • Select an option

  • Save uarun/8456673 to your computer and use it in GitHub Desktop.

Select an option

Save uarun/8456673 to your computer and use it in GitHub Desktop.
Akka FAQ and notes for myself :)

Akka FAQ

  1. Constructor vs preStart() - Is it ok to create child actors in the constructor vs doing it in preStart() ?

Both the constructor and preStart() are called during a restart. So it's absolutely fine to created child actors in the constructor. (Aside: when using preStart() always call super.preStart() first). If for some reason you don't want to create children during restart then use preStart() for creating and make sure you overrride preRestart()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment