score:1
first of all, always use the documentation for the version you're using, in your case you're linking to the snapshot documentation which is for an unreleased akka version (i.e. a snapshot).
here's the 2.1.2 docs: http://doc.akka.io/docs/akka/2.1.2/scala/dispatchers.html (also accessible from doc.akka.io)
when we look at that page, we see that under the example configuration for fork-join-executor and thread-pool-executor it says: "for more options, see the default-dispatcher section of the configuration.", linking to:
where we can find:
# this will be used if you have set "executor = "thread-pool-executor""
thread-pool-executor {
# keep alive time for threads
keep-alive-time = 60s
# min number of threads to cap factor-based core number to
core-pool-size-min = 8
# the core pool size factor is used to determine thread pool core size
# using the following formula: ceil(available processors * factor).
# resulting size is then bounded by the core-pool-size-min and
# core-pool-size-max values.
core-pool-size-factor = 3.0
# max number of threads to cap factor-based number to
core-pool-size-max = 64
# minimum number of threads to cap factor-based max number to
# (if using a bounded task queue)
max-pool-size-min = 8
# max no of threads (if using a bounded task queue) is determined by
# calculating: ceil(available processors * factor)
max-pool-size-factor = 3.0
# max number of threads to cap factor-based max number to
# (if using a bounded task queue)
max-pool-size-max = 64
# specifies the bounded capacity of the task queue (< 1 == unbounded)
task-queue-size = -1
# specifies which type of task queue will be used, can be "array" or
# "linked" (default)
task-queue-type = "linked"
# allow core threads to time out
allow-core-timeout = on
}
so to conclude, you need to set the default-dispatcher to use the "thread-pool-executor"
if you want to use the threadpoolexecutor, by akka.default-dispatcher.executor = "thread-pool-executor"
and then specify your configuration for that thread-pool-executor.
does that help?
cheers, √
Source: stackoverflow.com
Related Query
- What is the correct way to configure actors in Play 2.x?
- Scala, Play framework, Specs2, Mockito, what is the correct way to verify order of calls?
- What is the correct way to get a subarray in Scala?
- What is the correct way to implement trait with generics in Scala?
- What is the correct way to implement Producer Consumer in scala
- What is the correct (functional) way to alter a list and return what was removed?
- What is the correct way to specify type variance for methods in a companion object
- What is the correct way to register generic type to spray-json-support in akka-http Scala?
- What are the correct apply and unapply methods to avoid this java.lang.ClassCastException error in a Scala Play app?
- What is the proper way to insert/update a BLOB with Play 2.3?
- What is the correct way to identify if the folder exist on ADLS gen 2 account or not
- What is the proper way to format a double in a Play 2 template
- What is the correct way to use typeclass syntax when you have a typeclass within a typeclass?
- What is the preferred way to create actors in Akka?
- Play framework 2 : What is a proper way to render the contents of parent template?
- What is the correct way to dynamically pass a list or variable into a SQL cell in a spark databricks notebook in Scala?
- What is the correct way to initialise a trait's fields at construction
- play framework - what is the proper way to return list of data?
- What is the correct way to use the AddJobFlowStep in the AWS EMR sdk?
- What is the correct way to effect multiple updates on a Neo4J graph?
- What is the correct way to make a list in Scala?
- What is the correct way of using static assets in a Scala SBT project?
- What is the easest way return objects as json response from action in play framework (scala)?
- What is the correct way to invoke this Scala method on main?
- what is the way of accessing app outer folder files to render in template of play framework 2.6.x?
- In Scala what is the correct way to fix "error: forward reference extends over definition of value"?
- What is the correct way to accept all json field values as String in Spark Scala?
- What is the proper way of using coffeescript in play framework?
- Play framework : What is the best way to pass on scala template parameter to Javascript (angular)?
- Scala flatMap method on Option type cannot be resolved. What is the correct way to do this?
More Query from same tag
- scala implicit performance
- semantics behind _ in Scala method calls
- Play 2.0 templating - Scala `match` and `val` do not compile in a view template
- Type parameter declaration in Scala
- How to reach to static method from class instance for mock
- How to replace string values in one column with actual column values from other columns in the same dataframe?
- simple video decoding in Java / Scala
- For comprehension with Future[Option[T]] and executing subsequent futures based on conditions
- Best way to scale scala + akka microservices?
- SBT: Simplest way to separate plugins.sbt
- Function that takes parameter of Unit type
- Calling string.reverse with or without () gives different results
- Lift Archetype Basic JPA 2.9.1 won't compile
- Scala - Behaviour of hashCode & equals when using mutable HashSet
- How to stop Eclipse / Scala IDE from uploading all my projects at once?
- open file on windows with scala source.fromFile()
- What the best way to execute "not transformation" actions in elements of a Dataset
- Scala implicit TypeTag not propagating correctly (implicit type is Nothing)
- Convert Spark's DataFrame to RDD[Vector]
- Generate lazy "spiral" in Scala
- When can parentheses be safely omitted in Scala?
- No main class detected in Play2 project with maven
- how can I duplicates data based on a value in a dataset in scala?
- List building in Scala
- Import Class: error: not found: object Controller
- Is there a hotkey for searching for references in IntelliJ when using Scala?
- Can I convert an incoming stream of data into an array?
- Scala higher-kinded type issue with new collection class
- How to pattern match in scala 2.13?
- How do I use joinWith to join more than 2 datasets?