Maximum number of client PINGs that can be outstanding before the connection is considered stale.
Maximum number of consecutive reconnect attempts before the client closes the connection. Specify -1
to retry forever.
A name for the client. Useful for identifying a client on the server monitoring and logs.
Public NKey Identifying the user.
nkey file path - will automatically setup an nkey
and nonceSigner
that references the specified nkey seed file.
Requires server support 1.2.0+. When set to true
, the server will not forward messages published by the client
to the client's subscriptions. By default value is ignored unless it is set to true
explicitly
When true
does not randomize the order of servers provided to connect.
Nonce signer - a function that signs the nonce challenge sent by the server.
User password.
Interval in milliseconds that the client will send PINGs to the server. See NatsConnectionOptions.maxPingOut
Specifies the port on the localhost to make a connection.
Specifies whether the client should attempt reconnects.
Specifies the interval in milliseconds between reconnect attempts.
A list of server URLs where the client should attempt a connection.
number of milliseconds when making a connection to wait for the connection to succeed. Must be greater than zero.
If true, or set as a tls.TlsOption object, requires the connection to be secure. Fine grain tls settings, such as certificates can be specified by using a tls.TlsOptions object.
Token to use for authentication.
Server URL where the client should attempt a connection
NATS username.
Credentials file path - will automatically setup an nkey
and nonceSigner
that references the specified credentials file.
A JWT identifying the user. Can be a static JWT string, or a function that returns a JWT when called.
If true, the client will perform reconnect logic if it fails to connect when first started. Normal behaviour is for the client to try the supplied list of servers and close if none succeed.
Specifies the max amount of time the client is allowed to process inbound messages before yielding for other IO tasks. When exceeded the client will yield.
Generated using TypeDoc
Sets the encoding type used when dealing with Payload.STRING messages. Only node-supported encoding allowed.