title: Akka - what after an actor has been stopped?
body: <p>I am not sure what approach to follow for Akka supervision.</p>
  
  <p>I have an Akka actor that lists files from a FTP server when a message triggers it. If the connection is broken, the actor will fail with an exception (say, IOException) which will trigger supervision. At this point, I see two alternatives:</p>
  
  <ul>
  <li>I keep resuming / restarting the actor until the server comes back up, maybe with an exponential backoff</li>
  <li>I set parameters (such as maxNrOfRetries = xy) in a way that the supervisor will give up and stop the actor after xy times</li>
  </ul>
  
  <p>The first strategy seems wasteful, but the second one seems to bring another issue: how would the actor be eventually restarted? I have the feeling that tuning  the parameters of the Backoff supervisor is the best way to go, but maybe I'm missing something?</p>