OnGroupStreamOptions interface

Options controlling how inbound group streams are tracked and dispatched for a single callback registered via client.onGroupStream(callback, options).

Granularity is two-level:

  • The option values are scoped to the registration (i.e. per handler): each onGroupStream call carries its own values, and different handlers may use different values.
  • The option effects are applied independently to each stream, identified by its (group, streamId) pair. Concurrent streams — even two streams in the same group observed by the same handler — each get their own idle timer and their own handleFromStart gate. Nothing is shared or aggregated across streams or across groups.

Properties

groupNames

Optional group names to receive streams from. When omitted, streams from all groups are received.

handleFromStart

Whether to require the first observed fragment of a stream to start at streamSequenceId === 1, evaluated independently per stream (identified by its (group, streamId) pair). If true and the first observed fragment for a stream is mid-stream, that stream is ignored until its terminal frame arrives, without affecting any other concurrent stream. Default: false.

idleTimeoutInMs

Inactivity timeout in milliseconds, applied independently to each stream (identified by its (group, streamId) pair). Every stream has its own timer that is reset whenever a fragment for that stream arrives. If no fragment arrives within this duration, only that stream is terminated with an IdleTimeout error; sibling streams of the same handler are unaffected. Default: 300000 (5 minutes).

Property Details

groupNames

Optional group names to receive streams from. When omitted, streams from all groups are received.

groupNames?: string[]

Property Value

string[]

handleFromStart

Whether to require the first observed fragment of a stream to start at streamSequenceId === 1, evaluated independently per stream (identified by its (group, streamId) pair). If true and the first observed fragment for a stream is mid-stream, that stream is ignored until its terminal frame arrives, without affecting any other concurrent stream. Default: false.

handleFromStart?: boolean

Property Value

boolean

idleTimeoutInMs

Inactivity timeout in milliseconds, applied independently to each stream (identified by its (group, streamId) pair). Every stream has its own timer that is reset whenever a fragment for that stream arrives. If no fragment arrives within this duration, only that stream is terminated with an IdleTimeout error; sibling streams of the same handler are unaffected. Default: 300000 (5 minutes).

idleTimeoutInMs?: number

Property Value

number