[英]How to set up file-io-dispatcher at akka http?
When I was trying to start akka
I had this error with ConfigFactory.load()
: 当我尝试启动
akka
, ConfigFactory.load()
出现此错误:
Exception in thread "main" com.typesafe.config.ConfigException$UnresolvedSubstitution: reference.conf @ jar:file:/home/faoxis/.ivy2/cache/com.typesafe.akka/akka-http_2.12/jars/akka-http_2.12-10.1.5.jar!/reference.conf: 51: Could not resolve substitution to a value: ${akka.stream.blocking-io-dispatcher}
In source code I found this: 在源代码中,我发现了这一点:
# Fully qualified config path which holds the dispatcher configuration
# to be used by FlowMaterialiser when creating Actors for IO operations.
file-io-dispatcher = ${akka.stream.blocking-io-dispatcher}
I have a question with it. 我有一个问题。 Can I use some default setting without using environment variable
akka.stream.blocking-io-dispatcher
? 我可以不使用环境变量
akka.stream.blocking-io-dispatcher
来使用一些默认设置吗? Maybe I can set up that by application.conf
? 也许我可以通过
application.conf
进行设置?
The only thing you can do with application.conf
and Environment Variables
is override properties that are defined in reference.conf
. 使用
application.conf
和Environment Variables
唯一可以做的是覆盖reference.conf
中定义的属性。
So you can configure akka.stream.blocking-io-dispatcher
in any of them. 因此,您可以在其中任何一个中配置
akka.stream.blocking-io-dispatcher
。
Strange is that usually there is a default value set. 奇怪的是,通常会设置默认值。 I use
akka-http
with Play and I never had to set any configuration. 我在Play上使用了
akka-http
,而akka-http
设置任何配置。
See here the akka-streams
Configuration: stream-configuration 参见此处
akka-streams
配置: 流配置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.