Cannot configure the Akka Http server when using the akka-http-spring-boot library

假如想象 提交于 2019-12-11 09:02:46

问题


I am trying to setup a project that runs REST services on top of a AKKA HTTP server yet managed by Spring boot. Now i found this project on gihub as a reference and am using that as libraries to achieve my goal.

This is the project : https://github.com/scalaspring/akka-http-spring-boot

Now i cannot figure out a way to override the actor settings like adding a new dispatcher etc . I also cannot override the default port number to intercept the requests. I intend to handle the blocking requests on a different dispatcher with a thread pool. I understand i need to create a application.conf to make it work. I have created a src/main.resources folder that has application.conf but it is are not being read. Can some one guide me with this ?

My application.conf looks like this,

my-blocking-dispatcher {
  # Dispatcher is the name of the event-based dispatcher
  type = Dispatcher

  # What kind of ExecutionService to use
  executor = "thread-pool-executor"

  # Configuration for the fork join pool
  thread-pool-executor {
     fixed-pool-size = 16
  }

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

来源:https://stackoverflow.com/questions/48681847/cannot-configure-the-akka-http-server-when-using-the-akka-http-spring-boot-libra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!