gpt4 book ai didi

scala - 如何知道,如果配置已加载

转载 作者:行者123 更新时间:2023-12-01 00:13:29 25 4
gpt4 key购买 nike

我正在使用 akka http websocket client并希望让客户保持活力。
在 Automatic keep-alive Ping support 部分,它说,将配置放入 application.conf 如下:

akka.http.client.websocket.periodic-keep-alive-mode = pong

我已经这样做了:
akka.http {
websocket {
# periodic keep alive may be implemented using by sending Ping frames
# upon which the other side is expected to reply with a Pong frame,
# or by sending a Pong frame, which serves as unidirectional heartbeat.
# Valid values:
# ping - default, for bi-directional ping/pong keep-alive heartbeating
# pong - for uni-directional pong keep-alive heartbeating
#
# See https://tools.ietf.org/html/rfc6455#section-5.5.2
# and https://tools.ietf.org/html/rfc6455#section-5.5.3 for more information
periodic-keep-alive-mode = ping

# Interval for sending periodic keep-alives
# The frame sent will be the onne configured in akka.http.server.websocket.periodic-keep-alive-mode
# `infinite` by default, or a duration that is the max idle interval after which an keep-alive frame should be sent
periodic-keep-alive-max-idle = infinite
}
}

如何确定配置是否被采用?

最佳答案

我不确定我是否真的理解您的问题,但是您可以通过设置 akka.log-config-on-start 在加载 Actor 系统时显示完整的配置(包括覆盖等)。到。

Akka Docs on Logging the Configuration

related stackoverflow

关于scala - 如何知道,如果配置已加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55728734/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com