Interface StreamingManagerConfig

Configuration options for the StreamingManager. StreamingManagerConfig

interface StreamingManagerConfig {
    maxConcurrentStreams?: number;
    defaultStreamInactivityTimeoutMs?: number;
    maxClientsPerStream?: number;
    onClientSendErrorBehavior?: "log_and_continue" | "deregister_client" | "throw";
}

Properties

maxConcurrentStreams?: number

Maximum number of concurrent active streams allowed. If set to 0 or a negative number, it implies no limit (not recommended for production).

Default

1000
defaultStreamInactivityTimeoutMs?: number

Default timeout in milliseconds for a stream if no activity is detected. If set to 0, streams do not time out automatically. (Conceptual, requires active tracking)

Default

300000 (5 minutes)
maxClientsPerStream?: number

Maximum number of clients allowed to subscribe to a single stream. If set to 0 or a negative number, it implies no limit.

Default

10
onClientSendErrorBehavior?: "log_and_continue" | "deregister_client" | "throw"

Optional: Defines the behavior when trying to push a chunk to a client whose sendChunk method fails.

  • 'log_and_continue': Logs the error and continues sending to other clients. (Default)
  • 'deregister_client': Logs the error, attempts to deregister the failing client, and continues.
  • 'throw': Throws an error, potentially stopping the push operation for the current chunk to other clients.

Default

'log_and_continue'