Accepted answer

One way of handling this would be for each worker, on receipt of a task to start on, sets a timeout before changing state to process the task, eg:

  context.setReceiveTimeout(5 minutes)  // for the '5 minutes' notation - import scala.concurrent.duration._

If the timeout is received, the worker can abort the task (or whatever other action you deem appropriate - eg. kill itself, or pass a notification message back to the master). Don't forget to cancel the timeout (set duration = Duration.Undefined) if the task is completed or the like.

Related Query

More Query from same tag