Skip to main content

Interface: ConnectionOptions


GRPC + Temporal server connection options



Optional address: string

Server hostname and optional port. Port defaults to 7233 if address contains only host.

default localhost:7233


Optional channelArgs: ChannelOptions

GRPC Channel arguments

see option descriptions here


Optional connectTimeout: string | number

Milliseconds to wait until establishing a connection with the server.

Used either when connecting eagerly with Connection.connect or calling Connection.ensureConnected.

format ms formatted string

default 10 seconds


Optional credentials: ChannelCredentials

Channel credentials, create using the factory methods defined here

Either tls or this may be specified for configuring TLS


Optional interceptors: Interceptor[]

Grpc interceptors which will be applied to every RPC call performed by this connection. By default, an interceptor will be included which automatically retries retryable errors. If you do not wish to perform automatic retries, set this to an empty list (or a list with your own interceptors).


Optional metadata: Metadata

Optional mapping of gRPC metadata (HTTP headers) to send with each request to the server.

In order to dynamically set metadata, use Connection.withMetadata


Optional tls: null | boolean | TLSConfig

TLS configuration. Pass a falsy value to use a non-encrypted connection or true or {} to connect with TLS without any customization.

Either credentials or this may be specified for configuring TLS