Hi, 

I'm using Akka 2.4.17 and I try to configure the "default-dispatcher" to 
have at least 50 thread (arbitrary). But Java Mission Control only show 6 
or 8. 

How I can pre-allocate a pool of 50 ready to go threads ?

Thanks


*MainEntry.java*

/**
 * Entry point.
 *
 * @param args The program arguments
 * @since 17.04.02
 */
public static void main(final String[] args) {
    final Injector injector = Guice.createInjector(new ApplicationModules());
    final ActorSystem akkaSystem = ActorSystem.create(
        "akka-system",
        injector.getInstance(Config.class)
    );

    final Camel camel = CamelExtension.get(akkaSystem);
    final SimpleRegistry simpleRegistry = new SimpleRegistry();
    camel.context().setRegistry(simpleRegistry);
    camel.context().addComponent(
        "rabbitmq",
        new RabbitMQComponent(camel.context())
    );
    camel.activationFutureFor(
        akkaSystem.actorOf(Props.create(TransformActorConsumer.class)),
        new Timeout(Duration.create(5, TimeUnit.SECONDS)),
        akkaSystem.dispatcher()
    );

    LOG.debug("Hello World!");
}




*application.conf*

akka {

  # Tell to Akka to use Slf4J rather than built-in logger.
  # http://doc.akka.io/docs/akka/2.4/java/logging.html
  loggers = ["akka.event.slf4j.Slf4jLogger"]
  loglevel = "DEBUG"
  logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"

  actor {
    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 = 50
        # Parallelism (threads) ... ceil(available processors * factor)
        parallelism-factor = 1.0
        # Max number of threads to cap factor-based parallelism number to
        parallelism-max = 125
      }

      # 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 = 1
    }
  }
}




sdf

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to