Skip to main content
Every option is validated once, when the client is created. An invalid option is rejected with a NexusConfigError naming the option, the reason and the value you passed - including the array index for a schedule entry. Nothing is coerced: a coerced mistake resurfaces days later as unexplained load or a stalled stream, with nothing pointing back at the cause.

Options

What gets rejected

The last one carries only the key’s prefix. Key material never appears in an error message or a log record.

The deadlines, and why there are three

A request without a deadline is the failure that wedges a client: a connection a middlebox has stopped answering never settles, and the in-flight guard it holds is never released. requestTimeoutMs bounds that. A live stream needs different treatment, because it is supposed to stay open with nothing arriving. streamConnectTimeoutMs bounds only the connection attempt. streamIdleTimeoutMs is the liveness deadline: it is reset by every byte, keepalive comments included, so a healthy but quiet stream stays open indefinitely while a connection dropped silently by a proxy is detected instead of reading as healthy forever.

Cooldown schedule

After the live stream fails three times in a row, the SDK stops trying it for a while and relies on TTL polling. sseReconnectCooldown is how long it waits before each subsequent attempt, in minutes:
  • undefined - [5, 10, 20, 40, 60]
  • a number, e.g. 10 - a fixed ten-minute interval
  • an array, e.g. [1, 2, 5] - a custom schedule that stays at its last value
Every entry must be a positive finite number.