4

I am using akka http websocket client and would like to keep the client alive.
On the section Automatic keep-alive Ping support it says, to put the configuration into application.conf as the following:

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

I've done as:

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
  }
} 

How to figure out, if the configuration was taken or not?

softshipper
  • 32,463
  • 51
  • 192
  • 400

1 Answers1

4

I'm not sure I really understand your question, but you can show the complete configuration (including overrides etc.) when the actor system is loaded by setting akka.log-config-on-start to on.

Akka Docs on Logging the Configuration

related stackoverflow

David Ogren
  • 4,396
  • 1
  • 19
  • 29
  • The question was, do I have to load the configuration manually or it will do automatically. – softshipper Apr 18 '19 at 09:10
  • 1
    See the docs on Akka configuration ( https://doc.akka.io/docs/akka/current/general/configuration.html#where-configuration-is-read-from ). By default, Akka does read in all of application.conf. You can use the config option above to confirm that it has done so and that the resulting configuration is what you expected. – David Ogren Apr 18 '19 at 10:15