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.
- How to set Akka actors run only for specific time period?
- How to mock child Actors for testing an Akka system?
- How to set up a local development environment for Scala Spark ETL to run in AWS Glue?
- How to use "cube" only for specific fields on Spark dataframe?
- Run list of akka actors for list of messages
- log4j2.properties tuning to set a specific log level for Spark only
- How to mock some methods only throw exception for the first time and then do nothing, with specs2?
- How to infer StructType schema for Spark Scala at run time given a Fully Qualified Name of a case class
- How do I create a "Locator" for Akka Actors
- How to unsubscribe Akka logs in run time
- How can I ask sbt-buildinfo to run only at (re)load time and not compile time?
- How can I set script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' ; for specific page or path in play framework 2.6.x?
- How to count actors of a certain type active at a certain time in an akka system?
- How can I gather state information from a set of actors using only the actorSystem?
- How to set MediaType for HttpResponse in Akka Http?
- how to watch multiple akka actors for termination
- Scaffeine: how to set different expiration time for default value
- How to set dispatcher / thread pool for akka http
- How to set up Akka actors to process messages in serial and in parallel based on predicate?
- Run an akka class in a certain period of a time
- How to set SLF4J logging appenders for akka ActorSystem's logger
- How to set expiry time for all Ignite caches?
- How to create exponential restart strategy for specific error types in an Akka stream?
- How to time how long it takes for Akka HTTP to complete HTTP request
- How to set default strategy for a router in akka using configuration
- How to use a specific stylesheet for only 1 page in Play
- Gatling - how do I run a particular scenario for a specific duration
- How to create a trigger in akka quartz, which will start executing a job only once in special time
- How to set heap size for sbt?
- How do I declare a constructor for an 'object' class type in Scala? I.e., a one time operation for the singleton
More Query from same tag
- Sbt alternative to "mvn install -DskipTests"
- Why is scala match.error thrown?
- Instantiating Akka actors in a Play application with Subcut
- Spark RDD[(String, String)] into RDD[Map[String, String]]
- How to cancel Future in Scala?
- Make CRUD operations with ReactiveMongo
- The case for point free style in Scala
- Convert java to scala - overloaded static methods
- How can I use acknowledgment semantics in a Flow?
- Joda-time parser with instance-local default timezone
- Convert GenericRecord to DF
- (How) can I share a package on the main Scala Bazaar (scala-dev) with sbaz
- Is tail recursion optimization guaranteed in Scala when it is possible?
- Converting Pk[Long] to Option[Long] in a Form
- Nil and List as case expressions in Scala
- request-reply with akka-camel and ActiveMQ
- scala -- How to customize date format using SimpleDateFormat using json4s
- Reload app on custom file change in playframework
- Adding fields of case classes in scala
- Scala+Android: Is anybody successfully building and debugging in Eclipse?
- Testing at type-level computing in Scala
- Spark remove duplicate rows from DataFrame
- Calling Dataset static method does not work in Spark Shell
- Actors and unit testing
- Get typesafe config value as Array of Case class
- convert scala.collection.Iterator to java list
- Is there any way to use groupBy on a stream and send each substream to a different file?
- Scala Play connecting to MySql shows runtime error "Table 'token' doesn't exist"
- Perform 2 operations to update on ReactiveMongo
- How to change the functional insert-sort code to be tail recursive