ChangeStreamClientOptions
Defined in: libs/runtime/src/change-stream-client.ts:55
How a ChangeStreamClient connects and retries.
Member summary
Section titled “Member summary”Properties
| Name | Description |
|---|---|
| headers? | Headers to send with every request — a bearer token, for a hub that wants one. |
| maxRetries? | How many failed connection attempts in a row to retry before giving up, calling onFailed with 'transport'. |
| retryMs? | Retry delay after a dropped connection, in milliseconds. |
Properties
Section titled “Properties”headers?
Section titled “headers?”
readonlyoptionalheaders?: () =>Record<string,string> |Promise<Record<string,string>>
Defined in: libs/runtime/src/change-stream-client.ts:68
Headers to send with every request — a bearer token, for a hub that wants one. A function, and called per request, because a token expires and a long-lived subscription must not keep presenting the one it started with.
Returns
Section titled “Returns”Record<string, string> | Promise<Record<string, string>>
maxRetries?
Section titled “maxRetries?”
readonlyoptionalmaxRetries?:number
Defined in: libs/runtime/src/change-stream-client.ts:62
How many failed connection attempts in a row to retry before giving up, calling onFailed with 'transport'.
A connection that succeeds resets the count. Default 5.
retryMs?
Section titled “retryMs?”
readonlyoptionalretryMs?:number
Defined in: libs/runtime/src/change-stream-client.ts:57
Retry delay after a dropped connection, in milliseconds. It grows linearly with each failed attempt. Default 200.
TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.