I created an application that uses Akka with RoundRobin routers. The application takes a list of files and the processes them in parallel. My issue is that regardless of the number of workers that I specify the application processes only 12 files at a time. Is there a certain setting that I need to change ?
val workers = context.actorOf(Props[ItemProcessingWorker].withRouter(RoundRobinRouter(nworkers)))
update: I tried to send the params via config programmatically.. still not working.
val conf1 = ConfigFactory.load(ConfigFactory.parseString("""
akka {
default-dispatcher {
# Dispatcher is the name of the event-based dispatcher
type = Dispatcher
# What kind of ExecutionService to use
executor = "fork-join-executor"
# Configuration for the fork join pool
fork-join-executor {
# Min number of threads to cap factor-based parallelism number to
parallelism-min = 32
# Parallelism (threads) ... ceil(available processors * factor)
parallelism-factor = 1.0
# Max number of threads to cap factor-based parallelism number to
parallelism-max = 32
}
# Throughput defines the maximum number of messages to be
# processed per actor before the thread jumps to the next actor.
# Set to 1 for as fair as possible.
throughput = 1000
}}
"""))
val system = ActorSystem("MySystem2",conf1)
ok I got this resolved, I was missing a sub configuration instead of
it should be
In your
resources/application.conf
try changing the values of thedefault-dispatcher