Created
June 10, 2018 13:56
-
-
Save adamw/11b58818922e12a28fa2cfb4fb7bc955 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BroadcastActor(connector: QueueConnector[Future]) | |
extends Actor with ActorLogging { | |
// ... | |
// optional - the default one is identical | |
override def supervisorStrategy: SupervisorStrategy = OneForOneStrategy() { | |
case _: ActorInitializationException => Stop | |
case _: ActorKilledException => Stop | |
case _: DeathPactException => Stop | |
case e: Exception => | |
log.info(s"[broadcast] exception in child actor: ${e.getMessage}, restarting") | |
Restart | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment