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

问题描述 投票:3回答:1

我正在使用akka http websocket client,并希望让客户端保持活力。 在自动保持活动Ping支持部分,它说,将配置放入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
  }
} 

如何配置,如果配置是否采取?

scala akka akka-http
1个回答
4
投票

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

Akka Docs on Logging the Configuration

related stackoverflow

© www.soinside.com 2019 - 2024. All rights reserved.