I haven't found anything great along these lines, and I'd also be interested in an "official" answer.
Akka in its default configuration will use a single ForkJoinPool for the ActorSystem. If you can get a direct reference to the underlying ForkJoinPool, it has a handful of methods which can give diagnostic information.
forkJoinPool.getPoolSize
forkJoinPool.getParallelism
forkJoinPool.getActiveThreadCount
forkJoinPool.getRunningThreadCount
forkJoinPool.getQueuedSubmissionCount
forkJoinPool.getQueuedTaskCount
We are currently using code a bit like the following to extract the underlying ForkJoinPool from ActorSystem.dispatcher:
private def getExecutorServiceViaReflection(dispatcher: Dispatcher): Try[ExecutorServiceDelegate] = Try {
val executorServiceMethod: Method = classOf[Dispatcher].getDeclaredMethod("executorService")
executorServiceMethod
.invoke(dispatcher)
.asInstanceOf[ExecutorServiceDelegate]
}
getExecutorServiceViaReflection(system.dispatcher).get.executor.asInstanceOf[AkkaForkJoinPool]
This won't work if you have configured anything other than the default dispatcher. Your question about "individual thread pool usage" suggests that perhaps you have, so maybe you'll need to do something more complicated.