2

The spray-can docs comment on the spray.can.server.* and spray.can.client.* config settings:

spray.can.server { 
  # The time after which an idle connection will be automatically closed.
  # Set to `infinite` to completely disable idle connection timeouts.
  idle-timeout = 60 s

  # If a request hasn't been responded to after the time period set here
  # a `spray.http.Timedout` message will be sent to the timeout handler.
  # Set to `infinite` to completely disable request timeouts.
  request-timeout = 20 s

spray.can.client { 
  # The time after which an idle connection will be automatically closed.
  # Set to `infinite` to completely disable idle timeouts.
  idle-timeout = 60 s

  # The max time period that a client connection will be waiting for a response
  # before triggering a request timeout. The timer for this logic is not started
  # until the connection is actually in a state to receive the response, which
  # may be quite some time after the request has been received from the
  # application!
  # There are two main reasons to delay the start of the request timeout timer:
  # 1. On the host-level API with pipelining disabled:
  #    If the request cannot be sent immediately because all connections are
  #    currently busy with earlier requests it has to be queued until a
  #    connection becomes available.
  # 2. With pipelining enabled:
  #    The request timeout timer starts only once the response for the
  #    preceding request on the connection has arrived.
  # Set to `infinite` to completely disable request timeouts.
  request-timeout = 20 s

However, I also see that there's an implicit Timeout that can be passed to sendReceive.

Does setting any of the above config values result in a clash/override of the implicit Timeout? In short, I'm trying to understand the distinction between sendReceive's implicit time-out and the above config values.

Community
  • 1
  • 1
Kevin Meredith
  • 41,036
  • 63
  • 209
  • 384

0 Answers0