StreamOptions
StreamOptions<
T,V> =object
Defined in: sdks/js/node-sdk/dist/index.d.ts:302
Notification streams created by createStream use the retry settings and hooks. Durable message streams use onValue, onError, and onEnd. Core handles their network recovery; notification retry settings and hooks do not apply.
Type Parameters
Section titled “Type Parameters”T = unknown
V = T
Properties
Section titled “Properties”disableSync?
Section titled “disableSync?”
optionaldisableSync?:boolean
Defined in: sdks/js/node-sdk/dist/index.d.ts:349
Whether to skip pre-sync for notification streams. Durable message readers start receipt without a separate pre-sync. (default: false)
onEnd?
Section titled “onEnd?”
optionalonEnd?: () =>void
Defined in: sdks/js/node-sdk/dist/index.d.ts:306
Called when the stream ends
Returns
Section titled “Returns”void
onError?
Section titled “onError?”
optionalonError?: (error) =>void
Defined in: sdks/js/node-sdk/dist/index.d.ts:310
Called when a stream error occurs
Parameters
Section titled “Parameters”Error
Returns
Section titled “Returns”void
onFail?
Section titled “onFail?”
optionalonFail?: () =>void
Defined in: sdks/js/node-sdk/dist/index.d.ts:314
Called when a notification stream fails
Returns
Section titled “Returns”void
onRestart?
Section titled “onRestart?”
optionalonRestart?: () =>void
Defined in: sdks/js/node-sdk/dist/index.d.ts:318
Called when a notification stream is restarted
Returns
Section titled “Returns”void
onRetry?
Section titled “onRetry?”
optionalonRetry?: (attempts,maxAttempts) =>void
Defined in: sdks/js/node-sdk/dist/index.d.ts:322
Called when a notification stream is retried
Parameters
Section titled “Parameters”attempts
Section titled “attempts”number
maxAttempts
Section titled “maxAttempts”number
Returns
Section titled “Returns”void
onValue?
Section titled “onValue?”
optionalonValue?: (value) =>void|Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:328
Called when a value is emitted from the stream. For message streams, this selects callback mode. Do not also iterate that stream. Message delivery is acknowledged after this callback returns successfully.
Parameters
Section titled “Parameters”V
Returns
Section titled “Returns”void | Promise<void>
retryAttempts?
Section titled “retryAttempts?”
optionalretryAttempts?:number
Defined in: sdks/js/node-sdk/dist/index.d.ts:333
The number of times to retry a notification stream (default: 10)
retryDelay?
Section titled “retryDelay?”
optionalretryDelay?:number
Defined in: sdks/js/node-sdk/dist/index.d.ts:338
The delay between notification stream retries (in milliseconds) (default: 60000)
retryOnFail?
Section titled “retryOnFail?”
optionalretryOnFail?:boolean
Defined in: sdks/js/node-sdk/dist/index.d.ts:343
Whether to retry a notification stream if it fails (default: true)

