Optional
asyncOptional
pubOptional
repOptional
reqOptional
subGenerated using TypeDoc
Optional
asyncOptional
pubOptional
repOptional
reqOptional
subOptional
asyncOptional
maxOptional
minStatic
headerGenerated using TypeDoc
Optional
asyncOptional
maxOptional
minStatic
headerStatic
decodeStatic
fromStatic
validGenerated using TypeDoc
Static
decodeStatic
fromStatic
validOptional
api_Optional
causeOptional
chainedOptional
permissionOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
- -https://v8.dev/docs/stack-trace-api#customizing-stack-traces
-Static
stackStatic
captureStatic
errorGenerated using TypeDoc
Optional
api_Optional
causeOptional
chainedOptional
permissionOptional
queue?: stringOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Static
stackStatic
captureStatic
errorCreate and initialize a nuid.
- -private
-Private
fillPrivate
initInitializes a nuid with a crypto random prefix, +
Generated using TypeDoc
private
+Private
initPrivate
setGenerated using TypeDoc
Optional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
- -https://v8.dev/docs/stack-trace-api#customizing-stack-traces
-Static
stackStatic
captureStatic
isStatic
toGenerated using TypeDoc
Optional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Static
stackStatic
captureStatic
isStatic
toGenerated using TypeDoc
The different kinds of Advisories
-Generated using TypeDoc
The different kinds of Advisories
+These events represent informational notifications emitted by ConsumerMessages +
These events represent informational notifications emitted by ConsumerMessages that can be safely ignored by clients.
-DebugEvents are effectively statuses returned by the server that were ignored +
DebugEvents are effectively statuses returned by the server that were ignored
by the client. The data
portion of the
status is just a string indicating the code/message of the status.
Requests for messages can be terminated by the server, these notifications +
Requests for messages can be terminated by the server, these notifications
provide information on the number of messages and/or bytes that couldn't
be satisfied by the consumer request. The data
portion of the status will
have the format of {msgsLeft: number, bytesLeft: number}
.
Notifies whenever there's a request for additional messages from the server. +
Notifies whenever there's a request for additional messages from the server. This notification telegraphs the request options, which should be treated as read-only. This notification is only useful for debugging. Data is PullOptions.
-Generated using TypeDoc
Notifies that the current consumer will be reset
+ConsumerEvents are informational notifications emitted by ConsumerMessages +
ConsumerEvents are informational notifications emitted by ConsumerMessages that may be of interest to a client.
-Notification that the consumer was not found. Consumers that were accessible at +
Notification that the consumer was not found. Consumers that were accessible at least once, will be retried for more messages regardless of the not being found or timeouts etc. This notification includes a count of consecutive attempts to find the consumer. Note that if you get this notification possibly your code should attempt to recreate the consumer. Note that this notification is only informational for ordered consumers, as the consumer will be created in those cases automatically.
-Notification that heartbeats were missed. This notification is informational. +
Notification that heartbeats were missed. This notification is informational.
The data
portion of the status, is a number indicating the number of missed heartbeats.
Note that when a client disconnects, heartbeat tracking is paused while
the client is disconnected.
This notification is specific of ordered consumers and will be notified whenever +
This notification is specific of ordered consumers and will be notified whenever the consumer is recreated. The argument is the name of the newly created consumer.
-Notification that the stream was not found. Consumers were accessible at least once, +
Notification that the stream was not found. Consumers were accessible at least once, will be retried for more messages regardless of the not being found or timeouts etc. This notification includes a count of consecutive attempts to find the consumer. Note that if you get this notification possibly your code should attempt to recreate the consumer. Note that this notification is only informational for ordered consumers, as the consumer will be created in those cases automatically.
-Generated using TypeDoc
Other events that can be reported by the status iterator. +
Other events that can be reported by the NatsConnection#status iterator. These can usually be safely ignored, as higher-order functionality of the client will handle them.
-Generated using TypeDoc
Deliver all messages
-Deliver starting with the last message
-Deliver starting with the last messages for every subject
-Deliver starting with new messages
-Deliver starting with the specified sequence
-Deliver starting with the specified time
-Generated using TypeDoc
Deliver all messages
+Deliver starting with the last message
+Deliver starting with the last messages for every subject
+Deliver starting with new messages
+Deliver starting with the specified sequence
+Deliver starting with the specified time
+Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Events reported by the status iterator.
-Client disconnected
-Client received an async error from the server
-Client received a signal telling it that the server is transitioning to Lame Duck Mode
-Client reconnected
-Client received a cluster update
-Generated using TypeDoc
Events reported by the NatsConnection#status iterator.
+Client disconnected
+Client received an async error from the server
+Client received a signal telling it that the server is transitioning to Lame Duck Mode
+Client reconnected
+Client received a cluster update
+Set for heartbeat messages if the consumer is stalled
-Set for heartbeat messages
-Set for heartbeat messages
-Set for headers_only consumers indicates the number of bytes in the payload
-Set on protocol messages to indicate pull request byte count that +
Set for heartbeat messages if the consumer is stalled
+Set for heartbeat messages
+Set for heartbeat messages
+Set for headers_only consumers indicates the number of bytes in the payload
+Set on protocol messages to indicate pull request byte count that was not honored
-Set on protocol messages to indicate pull request message count that +
Set on protocol messages to indicate pull request message count that was not honored.
-Set if message is from a stream source - format is stream seq
Generated using TypeDoc
Set if message is from a stream source - format is stream seq
Include all available history for all keys
-Include the last value for all the keys
-Don't include history or last values, only notify +
Include all available history for all keys
+Include the last value for all the keys
+Don't include history or last values, only notify of updates
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
The stream sequence id of the last message ingested to the same original subject (or 0 if none or deleted)
-The sequence of the republished message
-The size in bytes of the message's body - Only if headers_only is set.
-The source stream of the message
-The original subject of the message
-Generated using TypeDoc
The stream sequence id of the last message ingested to the same original subject (or 0 if none or deleted)
+The sequence of the republished message
+The size in bytes of the message's body - Only if Republish#headers_only is set.
+The source stream of the message
+The original subject of the message
+Generated using TypeDoc
Retain messages while there is consumer interest on the particular subject.
-Retain messages until the limits are reached, then trigger the discard policy.
-Retain messages until acknowledged
-Generated using TypeDoc
Retain messages while there is consumer interest on the particular subject.
+Retain messages until the limits are reached, then trigger the discard policy.
+Retain messages until acknowledged
+Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Returns a Codec for encoding JavaScript object to JSON and +
Returns a Codec for encoding JavaScript object to JSON and serialize them to an Uint8Array, and conversely, from an Uint8Array to JSON to a JavaScript Object.
-Optional
reviver: ((this: unknown, key: string, value: unknown) => unknown)Generated using TypeDoc
Optional
reviver: ((this, key, value) => unknown)Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
opts: Partial<ConsumerConfig>Generated using TypeDoc
Optional
opts: Partial<ConsumerConfig>Generated using TypeDoc
Returns an Authenticator function that returns a JwtAuth. +
Returns an Authenticator function that returns a JwtAuth. This is a convenience Authenticator that parses the specified creds and delegates to the jwtAuthenticator.
- -the contents of a creds file or a function that returns the creds
-Generated using TypeDoc
the contents of a creds file or a function that returns the creds
+Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Returns true if the message is a flow control message
+Generated using TypeDoc
Returns true if the message is a heart beat message
+Returns an Authenticator function that returns a JwtAuth. +
Returns an Authenticator function that returns a JwtAuth. If a seed is provided, the public key, and signature are calculated.
- -the jwt
-Optional
seed: Uint8Array | (() => Uint8Array)the optional nkey seed
-Generated using TypeDoc
the jwt
+Optional
seed: Uint8Array | (() => Uint8Array)the optional nkey seed
+Generated using TypeDoc
Generated using TypeDoc
Returns an Authenticator that returns a NKeyAuth based that uses the +
Returns an Authenticator that returns a NKeyAuth based that uses the specified seed or function returning a seed.
- -Optional
seed: Uint8Array | (() => Uint8Array)the nkey seed
-Generated using TypeDoc
Optional
seed: Uint8Array | (() => Uint8Array)the nkey seed
+syncIterator is a utility function that allows an AsyncIterator to be triggered +
syncIterator is a utility function that allows an AsyncIterator to be triggered by calling next() - the utility will yield null if the underlying iterator is closed. Note it is possibly an error to call use this function on an AsyncIterable that has already been started (Symbol.asyncIterator() has been called) from a looping construct.
-Generated using TypeDoc
Returns a token authenticator for the specified token
- -Generated using TypeDoc
Returns a token authenticator for the specified token
+Returns a user/pass authenticator for the specified user and optional password
- -Optional
pass: string | (() => string)Generated using TypeDoc
Returns a user/pass authenticator for the specified user and optional password
+Optional
pass: string | (() => string)Generated using TypeDoc
The maximum number of outstanding ACKs any consumer may configure
-Indicates if Streams created in this account requires the max_bytes property set
-The maximum number of Consumer an account can create
-The maximum amount of Memory storage Stream Messages may consume
-The maximum amount of File storage Stream Messages may consume
-The maximum number of Streams an account can create
-The maximum size any single memory stream may be
-The maximum size any single storage based stream may be
-Generated using TypeDoc
The maximum number of outstanding ACKs any consumer may configure
+Indicates if Streams created in this account requires the max_bytes property set
+The maximum number of Consumer an account can create
+The maximum amount of Memory storage Stream Messages may consume
+The maximum amount of File storage Stream Messages may consume
+The maximum number of Streams an account can create
+The maximum size any single memory stream may be
+The maximum size any single storage based stream may be
+An advisory is an interesting event in the JetStream server
-Payload associated with the advisory
-The type of the advisory
-Generated using TypeDoc
HTTP like error code in the 300 to 500 range
-A human friendly description of the error
-Optional
err_The NATS error code unique to each kind of error
-Generated using TypeDoc
HTTP like error code in the 300 to 500 range
+A human friendly description of the error
+Optional
err_The NATS error code unique to each kind of error
+Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
asyncOptional
callbacksOptional
msgsOptional
pubOptional
repOptional
reqOptional
sizeOptional
subOptional
subjectGenerated using TypeDoc
Optional
asyncOptional
callbacksOptional
msgsOptional
pubOptional
repOptional
reqOptional
sizeOptional
subOptional
subjectAn interface that reports via a promise when an object such as a connection +
An interface that reports via a promise when an object such as a connection or subscription closes.
-A promise that when resolves, indicates that the object is closed.
-Generated using TypeDoc
A promise that when resolves, indicates that the object is closed.
+Generated using TypeDoc
Generated using TypeDoc
Encode T to an Uint8Array suitable for including in a message payload.
+Optional
authenticatorWhen the server requires authentication, set an Authenticator. +
Optional
authenticatorWhen the server requires authentication, set an Authenticator. An authenticator is created automatically for username/password and token authentication configurations -if user and pass or the token options are set.
-Optional
debugOptional
debugWhen set to true
the client will print protocol messages that it receives
or sends to the server.
Optional
ignoreBy default, NATS clients will abort reconnect if they fail authentication +
Optional
ignoreBy default, NATS clients will abort reconnect if they fail authentication twice in a row with the same error, regardless of the reconnect policy. This option should be used with care as it will disable this behaviour when true
-Optional
ignoreWhen set to true, cluster information gossiped by the nats-server will +
Optional
ignoreWhen set to true, cluster information gossiped by the nats-server will not augment the lists of server(s) known by the client.
-Optional
inboxA string prefix (must be a valid subject prefix) prepended to inboxes +
Optional
inboxA string prefix (must be a valid subject prefix) prepended to inboxes generated by client. This allows a client with limited subject permissions to specify a subject where requests can deliver responses.
-Optional
maxSets the maximum count of ping commands that can be awaiting a response -before rasing a stale connection status StaleConnection -notification status and initiating a reconnect.
- -pingInterval
-Optional
maxSets the maximum count of per-server reconnect attempts before giving up. +
Optional
maxSets the maximum count of ping commands that can be awaiting a response +before rasing a stale connection status DebugEvents#StaleConnection +notification NatsConnection#status and initiating a reconnect.
+pingInterval
+Optional
maxSets the maximum count of per-server reconnect attempts before giving up.
Set to -1
to never give up.
10
-Optional
nameSets the client name. When set, the server monitoring pages will display +
10
+
+Optional
nameSets the client name. When set, the server monitoring pages will display this name when referring to this client.
-Optional
noWhen true, the client will not augment timeout and other error traces with +
Optional
noWhen true, the client will not augment timeout and other error traces with additional context as to where the operation was started.
-Optional
noWhen set to true, messages published by this client will not match +
Optional
noWhen set to true, messages published by this client will not match this client's subscriptions, so the client is guaranteed to never receive self-published messages on a subject that it is listening on.
-Optional
noIf set to true, the client will not randomize its server connection list.
-Optional
passSets the password for a client connection. Requires that the user -option be set. See authenticator.
-Optional
pedanticWhen set to true, the server may perform additional checks on protocol +
Optional
noIf set to true, the client will not randomize its server connection list.
+Optional
passSets the password for a client connection. Requires that the user +option be set. See authenticator.
+Optional
pedanticWhen set to true, the server may perform additional checks on protocol message requests. This option is only useful for NATS client development and shouldn't be used, as it affects server performance.
-Optional
pingSets the number of milliseconds between client initiated ping commands. -See maxPingOut.
- -2 minutes.
-Optional
portSets the port number on the localhost (127.0.0.1) where the nats-server is running. -This option is mutually exclusive with servers.
-Optional
reconnectWhen set to true, the server will attempt to reconnect so long as -maxReconnectAttempts doesn't prevent it.
- -true
-Optional
reconnectSet a function that dynamically determines the number of milliseconds +
Optional
pingSets the number of milliseconds between client initiated ping commands. +See maxPingOut.
+2 minutes.
+
+Optional
portSets the port number on the localhost (127.0.0.1) where the nats-server is running. +This option is mutually exclusive with servers.
+Optional
reconnectWhen set to true, the server will attempt to reconnect so long as +maxReconnectAttempts doesn't prevent it.
+true
+
+Optional
reconnectSet a function that dynamically determines the number of milliseconds that the client should wait for the next reconnect attempt.
-Optional
reconnectSet the upper bound for a random delay in milliseconds added to -reconnectTimeWait.
- -100 millis
-Optional
reconnectSet the upper bound for a random delay in milliseconds added to -reconnectTimeWait. This only affects TLS connections
- -1000 millis
-Optional
reconnectSet the number of millisecods between reconnect attempts.
- -2000 millis
-Optional
serversSet the hostport(s) where the client should attempt to connect. -This option is mutually exclusive with port.
- -127.0.0.1:4222
-Optional
timeoutSets the number of milliseconds the client should wait for a server +
Optional
reconnectSet the upper bound for a random delay in milliseconds added to +reconnectTimeWait.
+100 millis
+
+Optional
reconnectSet the upper bound for a random delay in milliseconds added to +reconnectTimeWait. This only affects TLS connections
+1000 millis
+
+Optional
reconnectSet the number of millisecods between reconnect attempts.
+2000 millis
+
+Optional
resolveWhen false, the connect function will not perform any hostname resolution. Note that +by default this option will be true if the client supports hostname resolution. +Note that on clients that don't supported (mainly the websocket client, setting this +option to true, will throw an exception as this option is not available.
+Optional
serversSet the hostport(s) where the client should attempt to connect. +This option is mutually exclusive with port.
+127.0.0.1:4222
+
+Optional
timeoutSets the number of milliseconds the client should wait for a server handshake to be established.
- -20000 millis
-Optional
tlsWhen set (can be an empty object), the client requires a secure connection. +
20000 millis
+
+Optional
tlsWhen set (can be an empty object), the client requires a secure connection. TlsOptions honored depend on the runtime. Consult the specific NATS javascript client GitHub repo/documentation. When set to null, the client should fail should not connect using TLS. In the case where TLS is available on the server a standard connection will be used. If TLS is required, the connection will fail.
-Optional
tokenSet to a client authentication token. Note that these tokens are +
Optional
tokenSet to a client authentication token. Note that these tokens are a specific authentication strategy on the nats-server. This option -is mutually exclusive of user and pass. See authenticator.
-Optional
userSets the username for a client connection. Requires that the pass -option be set. See authenticator.
-Optional
verboseWhen set to true, the server will send response to all server commands. +is mutually exclusive of user and pass. See authenticator.
+Optional
userSets the username for a client connection. Requires that the pass +option be set. See authenticator.
+Optional
verboseWhen set to true, the server will send response to all server commands. This option is only useful for NATS client development and shouldn't be used, as it affects server performance.
-Optional
waitWhen set to true maxReconnectAttempts will not trigger until the client +
Optional
waitWhen set to true maxReconnectAttempts will not trigger until the client has established one connection.
-Generated using TypeDoc
Optional
opts: ConsumeOptionsOptional
opts: FetchOptionsOptional
cached: booleanOptional
opts: NextOptionsGenerated using TypeDoc
Optional
opts: ConsumeOptionsOptional
opts: FetchOptionsOptional
cached: booleanOptional
opts: NextOptionsAdds a new consumer to the specified stream with the specified consumer options.
-Returns the ConsumerInfo for the specified consumer in the specified stream.
-Lists all the consumers on the specfied streams
-Updates the consumer configuration for the specified consumer on the specified +
Adds a new consumer to the specified stream with the specified consumer options.
+Returns the ConsumerInfo for the specified consumer in the specified stream.
+Lists all the consumers on the specfied streams
+Updates the consumer configuration for the specified consumer on the specified stream that has the specified durable name.
-Generated using TypeDoc
The type of acknowledgment required by the Consumer
-Optional
ack_How long (in nanoseconds) to allow messages to remain un-acknowledged before attempting redelivery
-Optional
backoffList of durations in nanoseconds format that represents a retry timescale for +
The type of acknowledgment required by the Consumer
+Optional
ack_How long (in nanoseconds) to allow messages to remain un-acknowledged before attempting redelivery
+Optional
backoffList of durations in nanoseconds format that represents a retry timescale for NaK'd messages or those being normally retried
-Optional
deliver_Allows push consumers to form a queue group
- -Where to start consuming messages on the stream
-Optional
deliver_The subject where the push consumer should be sent the messages
- -Optional
descriptionA short description of the purpose of this consume
-Optional
durable_A unique name for a durable consumer -Set name - for ephemeral consumers, also set idle_heartbeat
-Optional
filter_Deliver only messages that match the subject filter -This is exclusive of filter_subjects
-Optional
filter_Deliver only messages that match the specified filters. -This is exclusive of filter_subject.
-Optional
flow_For push consumers this will regularly send an empty mess with Status header 100 +
Optional
deliver_Allows push consumers to form a queue group
+Where to start consuming messages on the stream
+Optional
deliver_The subject where the push consumer should be sent the messages
+Optional
descriptionA short description of the purpose of this consume
+Optional
durable_A unique name for a durable consumer +Set name - for ephemeral consumers, also set idle_heartbeat
+Optional
filter_Deliver only messages that match the subject filter +This is exclusive of filter_subjects
+Optional
filter_Deliver only messages that match the specified filters. +This is exclusive of filter_subject.
+Optional
flow_For push consumers this will regularly send an empty mess with Status header 100 and a reply subject, consumers must reply to these messages to control the rate of message delivery.
-Optional
headers_Delivers only the headers of messages in the stream and not the bodies. Additionally, -adds Nats-Msg-Size MessageSizeHdr header to indicate the size of +
Optional
headers_Delivers only the headers of messages in the stream and not the bodies. Additionally, +adds Nats-Msg-Size JsHeaders#MessageSizeHdr header to indicate the size of the removed payload
-Optional
idle_If the Consumer is idle for more than this many nanoseconds an empty message with +
Optional
idle_If the Consumer is idle for more than this many nanoseconds an empty message with Status header 100 will be sent indicating the consumer is still alive
-Optional
inactive_Duration that instructs the server to clean up ephemeral consumers that are inactive for that long
-Optional
max_The maximum number of messages without acknowledgement that can be outstanding, +
Optional
inactive_Duration in nanoseconds that instructs the server to clean up ephemeral consumers that are inactive for that long
+Optional
max_The maximum number of messages without acknowledgement that can be outstanding, once this limit is reached message delivery will be suspended
-Optional
max_The largest batch property that may be specified when doing a pull on a Pull Consumer
-Optional
max_The maximum bytes value that maybe set when dong a pull on a Pull Consumer
-Optional
max_The number of times a message will be redelivered to consumers if not acknowledged in time
-Optional
max_The maximum expires value that may be set when doing a pull on a Pull Consumer
-Optional
max_The number of pulls that can be outstanding on a pull consumer, +
Optional
max_The largest batch property that may be specified when doing a pull on a Pull Consumer
+Optional
max_The maximum bytes value that maybe set when dong a pull on a Pull Consumer
+Optional
max_The maximum number of times a message will be delivered to consumers.
+Optional
max_The maximum expires value in nanoseconds that may be set when doing a pull on a Pull Consumer
+Optional
max_The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
-Optional
mem_Force the consumer state to be kept in memory rather than inherit the setting from the stream
-Optional
metadataMetadata field to store additional information about the consumer. Note that +
Optional
mem_Force the consumer state to be kept in memory rather than inherit the setting from the stream
+Optional
metadataMetadata field to store additional information about the consumer. Note that
keys starting with _nats
are reserved. This feature only supported on servers
2.10.x and better.
Optional
nameThe consumer name
-Optional
num_When set do not inherit the replica count from the stream but specifically set it to this amount.
-Optional
opt_The sequence from which to start delivery messages. -Requires StartSequence
-Optional
opt_The date time from which to start delivering messages -Requires StartTime
-Optional
pause_Creates a consumer that is initially paused, but will resume at the specified Date and time. +
Optional
nameThe consumer name
+Optional
num_When set do not inherit the replica count from the stream but specifically set it to this amount.
+Optional
opt_The sequence from which to start delivery messages. +Requires DeliverPolicy#StartSequence
+Optional
opt_The date time from which to start delivering messages +Requires DeliverPolicy#StartTime
+Optional
pause_Creates a consumer that is initially paused, but will resume at the specified Date and time. Specified as an ISO date time string (Date#toISOString()).
-Optional
rate_The rate at which messages will be delivered to clients, expressed in bytes per second
-How messages are played back to the Consumer
-Generated using TypeDoc
Optional
rate_The rate at which messages will be delivered to clients, expressed in bytes per second
+How messages are played back to the Consumer
+The highest contiguous acknowledged message
-Optional
clusterThe cluster where the consumer is defined
-The consumer configuration
-The ISO timestamp when the Consumer was created
-The last message delivered from this Consumer
-A unique name for the consumer, either machine generated or the durable name
-The number of messages pending acknowledgement +
The highest contiguous acknowledged message
+Optional
clusterThe cluster where the consumer is defined
+The consumer configuration
+The ISO timestamp when the Consumer was created
+The last message delivered from this Consumer
+A unique name for the consumer, either machine generated or the durable name
+The number of messages pending acknowledgement but yet to acknowledged by the client.
-The number of messages left unconsumed in this Consumer
-The number of redeliveries that have been performed
-The number of pull consumers waiting for messages
-If the consumer was paused with a resume date, this field specifies the amount of time +
The number of messages left unconsumed in this Consumer
+The number of redeliveries that have been performed
+The number of pull consumers waiting for messages
+If the consumer was paused with a resume date, this field specifies the amount of time in nanoseconds remaining until the consumer will be automatically resumed. This field is only available on servers 2.11.x or better
-Optional
pausedSet to true if the consumer is paused. +
Optional
pausedSet to true if the consumer is paused. This field is only available on servers 2.11.x or better
-Indicates if any client is connected and receiving messages from a push consumer
-The stream hosting the consumer
-Optional
tsThe ISO timestamp when the ConsumerInfo was generated. This field is only available +
Indicates if any client is connected and receiving messages from a push consumer
+The stream hosting the consumer
+Optional
tsThe ISO timestamp when the ConsumerInfo was generated. This field is only available on servers 2.10.x or better
-Generated using TypeDoc
A JetStream interface that allows you to request the ConsumerInfo on the backing object.
-The consumer info for the consumer
-Generated using TypeDoc
A JetStream interface that allows you to request the ConsumerInfo on the backing object.
+The consumer info for the consumer
+Generated using TypeDoc
Optional
callbackAn optional callback to process messages - note that iterators are the preferred +
Optional
callbackAn optional callback to process messages - note that iterators are the preferred way of processing messages.
-The consumer configuration
-Optional
isIf true, the client will only attempt to bind to the specified consumer name/durable on +
The consumer configuration
+Optional
isIf true, the client will only attempt to bind to the specified consumer name/durable on the specified stream. If the consumer is not found, the subscribe will fail
-Enable manual ack. When set to true, the client is responsible to ack messages.
-Optional
maxStandard option for all subscriptions. Defines the maximum number of messages dispatched +
Enable manual ack. When set to true, the client is responsible to ack messages.
+Optional
maxStandard option for all subscriptions. Defines the maximum number of messages dispatched by the server before stopping the subscription. For JetStream this may not be accurate as JetStream can add additional protocol messages that could count towards this limit.
-Optional
nameThe consumer name
-Only applicable to push consumers. When set to true, the consumer will be an ordered +
Optional
nameThe consumer name
+Only applicable to push consumers. When set to true, the consumer will be an ordered consumer.
-Optional
queueOnly applicable to push consumers, allows the pull subscriber to horizontally load balance.
-The name of the stream
-Generated using TypeDoc
Optional
queueOnly applicable to push consumers, allows the pull subscriber to horizontally load balance.
+The name of the stream
+A builder API that creates a ConsumerOpt
-Ack'ing a message implicitly acks all messages with a lower sequence
-Consumer will ack all messages - not that unless manualAck is set +
A builder API that creates a ConsumerOpt
+Consumer will ack all messages - not that unless manualAck is set the client will auto ack messages after processing via its callback or when the iterator continues processing.
-Consumer will not track ack for messages
-Sets the time a delivered message might remain unacknowledged before a redelivery is attempted
-Bind to the specified durable (or consumer name if ephemeral) on the specified stream. +
Bind to the specified durable (or consumer name if ephemeral) on the specified stream. If the consumer doesn't exist, the subscribe will fail. Bind the recommended way of subscribing to a stream, as it requires the consumer to exist already.
-Specify the name of the stream, avoiding a lookup where the stream is located by +
Specify the name of the stream, avoiding a lookup where the stream is located by searching for a subject.
-Use a callback to process messages. If not specified, you process messages by iterating +
Use a callback to process messages. If not specified, you process messages by iterating on the returned subscription object.
-The name of the consumer
-Consumer will start at first available message on the stream
-Push consumer only option - Sets the name of the queue group - same as queue
-Consumer will start at the last message
-Consumer will deliver all the last per messages per subject
-Consumer will start with new messages (not yet in the stream)
-DeliverTo sets the subject where a push consumer receives messages
-User description of this consumer
-Sets the durable name, when not set an ephemeral consumer is created
-Consumer should filter the messages to those that match the specified filter. +
Consumer should filter the messages to those that match the specified filter. This api can be called multiple times.
-Push consumer flow control - the server sends a status code 100 and uses the delay on the +
Push consumer flow control - the server sends a status code 100 and uses the delay on the response to throttle inbound messages for a client and prevent slow consumer.
-Messages delivered to the consumer will not have a payload. Instead, +
Messages delivered to the consumer will not have a payload. Instead,
they will have the header Nats-Msg-Size
indicating the number of bytes
in the message as stored by JetStream.
Push consumer only option - Enables idle heartbeats from the server. If the number of +
Push consumer only option - Enables idle heartbeats from the server. If the number of specified millis is reached and no messages are available on the server, the server will send a heartbeat (status code 100 message) indicating that the JetStream consumer is alive.
-Pull consumer only - Sets the max amount of time that an ephemeral consumer will be +
Pull consumer only - Sets the max amount of time that an ephemeral consumer will be allowed to live on the server. If the client doesn't perform any requests during the specified interval the server will discard the consumer.
-Limit message delivery to the specified rate in bits per second.
-Prevents the consumer implementation from auto-acking messages. Message callbacks +
Prevents the consumer implementation from auto-acking messages. Message callbacks and iterators must explicitly ack messages.
-Max number of outstanding acks before the server stops sending new messages
-Max number of re-delivery attempts for a particular message
-Standard NATS subscription option which automatically closes the subscription after the specified +
Standard NATS subscription option which automatically closes the subscription after the specified number of messages (actual stream or flow control) are seen by the client.
-Pull consumer only - Sets the max number of messages that can be pulled in a batch +
Pull consumer only - Sets the max number of messages that can be pulled in a batch that can be requested by a client during a pull.
-Pull consumer only - Sets the max amount of time before a pull request expires that +
Pull consumer only - Sets the max amount of time before a pull request expires that may be requested by a client during a pull.
-Pull subscriber option only. Limits the maximum outstanding messages scheduled +
Pull subscriber option only. Limits the maximum outstanding messages scheduled via batch pulls as pulls are additive.
-Force the consumer state to be kept in memory rather than inherit the setting from +
Force the consumer state to be kept in memory rather than inherit the setting from the Stream
-When set do not inherit the replica count from the stream but specifically set it to this amount
-Push consumer only - creates an ordered consumer - ordered consumers cannot be a pull consumer +
Push consumer only - creates an ordered consumer - ordered consumers cannot be a pull consumer nor specify durable, deliverTo, specify an ack policy, maxDeliver, or flow control.
-Push consumer only option - Standard NATS queue group option, same as deliverGroup
-Replay messages as fast as possible
-Replay at the rate received
-Sample a subset of messages expressed as a percentage(0-100)
-Start delivering at the at a past point in time
-The consumer will start at the message with the specified sequence
-consumer will start with messages received on the specified time/date
-Generated using TypeDoc
Push consumer only option - Standard NATS queue group option, same as deliverGroup
+Generated using TypeDoc
Optional
ack_How long (in nanoseconds) to allow messages to remain un-acknowledged before attempting redelivery
-Optional
backoffList of durations in nanoseconds format that represents a retry timescale for +
Optional
ack_How long (in nanoseconds) to allow messages to remain un-acknowledged before attempting redelivery
+Optional
backoffList of durations in nanoseconds format that represents a retry timescale for NaK'd messages or those being normally retried
-Optional
deliver_The subject where the push consumer should be sent the messages
- -Optional
descriptionA short description of the purpose of this consume
-Optional
filter_Deliver only messages that match the subject filter -This is exclusive of filter_subjects
-Optional
filter_Deliver only messages that match the specified filters. -This is exclusive of filter_subject.
-Optional
headers_Delivers only the headers of messages in the stream and not the bodies. Additionally, -adds Nats-Msg-Size MessageSizeHdr header to indicate the size of +
Optional
deliver_The subject where the push consumer should be sent the messages
+Optional
descriptionA short description of the purpose of this consume
+Optional
filter_Deliver only messages that match the subject filter +This is exclusive of filter_subjects
+Optional
filter_Deliver only messages that match the specified filters. +This is exclusive of filter_subject.
+Optional
headers_Delivers only the headers of messages in the stream and not the bodies. Additionally, +adds Nats-Msg-Size JsHeaders#MessageSizeHdr header to indicate the size of the removed payload
-Optional
inactive_Duration that instructs the server to clean up ephemeral consumers that are inactive for that long
-Optional
max_The maximum number of messages without acknowledgement that can be outstanding, +
Optional
inactive_Duration in nanoseconds that instructs the server to clean up ephemeral consumers that are inactive for that long
+Optional
max_The maximum number of messages without acknowledgement that can be outstanding, once this limit is reached message delivery will be suspended
-Optional
max_The largest batch property that may be specified when doing a pull on a Pull Consumer
-Optional
max_The maximum bytes value that maybe set when dong a pull on a Pull Consumer
-Optional
max_The number of times a message will be redelivered to consumers if not acknowledged in time
-Optional
max_The maximum expires value that may be set when doing a pull on a Pull Consumer
-Optional
max_The number of pulls that can be outstanding on a pull consumer, +
Optional
max_The largest batch property that may be specified when doing a pull on a Pull Consumer
+Optional
max_The maximum bytes value that maybe set when dong a pull on a Pull Consumer
+Optional
max_The maximum number of times a message will be delivered to consumers.
+Optional
max_The maximum expires value in nanoseconds that may be set when doing a pull on a Pull Consumer
+Optional
max_The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
-Optional
mem_Force the consumer state to be kept in memory rather than inherit the setting from the stream
-Optional
metadataMetadata field to store additional information about the consumer. Note that +
Optional
mem_Force the consumer state to be kept in memory rather than inherit the setting from the stream
+Optional
metadataMetadata field to store additional information about the consumer. Note that
keys starting with _nats
are reserved. This feature only supported on servers
2.10.x and better.
Optional
num_When set do not inherit the replica count from the stream but specifically set it to this amount.
-Generated using TypeDoc
Optional
num_When set do not inherit the replica count from the stream but specifically set it to this amount.
+Returns the Consumer configured for the specified stream having the specified name. -Consumers are typically created with JetStreamManager. If no name is specified, +
Returns the Consumer configured for the specified stream having the specified name. +Consumers are typically created with JetStreamManager. If no name is specified, the Consumers API will return an ordered consumer.
An ordered consumer expects messages to be delivered in order. If there's any inconsistency, the ordered consumer will recreate the underlying consumer at the correct sequence. Note that ordered consumers don't yield messages that can be acked because the client can simply recreate the consumer.
- -Optional
name: string | Partial<OrderedConsumerOptions>or OrderedConsumerOptions - if not specified an ordered consumer is created +
+Optional
name: string | Partial<OrderedConsumerOptions>or OrderedConsumerOptions - if not specified an ordered consumer is created with the specified options.
-Generated using TypeDoc
Returns a Consumer based on the ConsumerInfo specified. +Note this method can throw, and it doesn't validate that the +underlying consumer exists. When using a consumer obtained +by this method it is important to check for ConsumerEvents#HeartbeatsMissed
+Readonly
[toRejects the Deferred
-Optional
reason: anyResolves the Deferred to a value T
-Optional
value: T | PromiseLike<T>Attaches a callback for only the rejection of the Promise.
- -A Promise for the completion of the callback.
-Optional
onrejected: ((reason: any) => TResult | PromiseLike<TResult>)The callback to execute when the Promise is rejected.
-Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The +
Readonly
[toRejects the Deferred
+Optional
reason: anyResolves the Deferred to a value T
+Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
- -A Promise for the completion of the callback.
-Optional
onfinally: (() => void)The callback to execute when the Promise is settled (fulfilled or rejected).
-Attaches callbacks for the resolution and/or rejection of the Promise.
- -A Promise for the completion of which ever callback is executed.
-Optional
onfulfilled: ((value: T) => TResult1 | PromiseLike<TResult1>)The callback to execute when the Promise is resolved.
-Optional
onrejected: ((reason: any) => TResult2 | PromiseLike<TResult2>)The callback to execute when the Promise is rejected.
-Generated using TypeDoc
Optional
onfinally: (() => void)The callback to execute when the Promise is settled (fulfilled or rejected).
+A Promise for the completion of the callback.
+Attaches callbacks for the resolution and/or rejection of the Promise.
+A Promise for the completion of which ever callback is executed.
+Readonly
[toAttaches a callback for only the rejection of the Promise.
- -A Promise for the completion of the callback.
-Optional
onrejected: ((reason: any) => TResult | PromiseLike<TResult>)The callback to execute when the Promise is rejected.
-Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The +
Readonly
[toAttaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
- -A Promise for the completion of the callback.
-Optional
onfinally: (() => void)The callback to execute when the Promise is settled (fulfilled or rejected).
-Attaches callbacks for the resolution and/or rejection of the Promise.
- -A Promise for the completion of which ever callback is executed.
-Optional
onfulfilled: ((value: void) => TResult1 | PromiseLike<TResult1>)The callback to execute when the Promise is resolved.
-Optional
onrejected: ((reason: any) => TResult2 | PromiseLike<TResult2>)The callback to execute when the Promise is rejected.
-Generated using TypeDoc
Optional
onfinally: (() => void)The callback to execute when the Promise is settled (fulfilled or rejected).
+A Promise for the completion of the callback.
+Attaches callbacks for the resolution and/or rejection of the Promise.
+A Promise for the completion of which ever callback is executed.
+Optional
account_The hash of the sending account if applicable.
-The intended consumer for the message.
-The client delivery sequence for the message
-JetStream domain of the message if applicable.
-The number of pending messages for the consumer at the time the +
Optional
account_The hash of the sending account if applicable.
+The intended consumer for the message.
+The number of times the message has been delivered.
+The client delivery sequence for the message
+JetStream domain of the message if applicable.
+The number of pending messages for the consumer at the time the message was delivered.
-True if the message has been redelivered.
-The number of times the message has been redelivered.
-The stream where the message came from
-The sequence number of the message in the stream
-The timestamp for the message in nanoseconds. Convert with millis(n)
,
Generated using TypeDoc
True if the message has been redelivered.
+@deprecated: use deliveryCount
+The stream where the message came from
+The sequence number of the message in the stream
+The timestamp for the message in nanoseconds. Convert with millis(n)
,
Destroys a resource on the server. Returns a promise that resolves to true +
Generated using TypeDoc
"Number of active Consumers
-Optional
domainMemory Storage being used for Stream Message storage
-File Storage being used for Stream Message storage
-Number of active Streams
-Optional
tiersOptional
R1?: JetStreamUsageAccountLimitsOptional
R3?: JetStreamUsageAccountLimitsGenerated using TypeDoc
"Number of active Consumers
+Optional
domainMemory Storage being used for Stream Message storage
+File Storage being used for Stream Message storage
+Number of active Streams
+Optional
tiersOptional
R1?: JetStreamUsageAccountLimitsOptional
R3?: JetStreamUsageAccountLimitsGenerated using TypeDoc
Interface for interacting with JetStream data
-Returns the JS API prefix as processed from the JetStream Options
-Returns the interface for accessing Consumers. Consumers +
Interface for interacting with JetStream data
+Returns the JS API prefix as processed from the JetStream Options
+Returns the interface for accessing Consumers. Consumers allow you to process messages stored in a stream. To create a -consumer use JetStreamManager.
-Returns the interface for accessing Streams.
-Accessor for the JetStream materialized views API
-Similar to pull, but able to configure the number of messages, etc. via PullOptions.
- -Returns the interface for accessing Streams.
+Accessor for the JetStream materialized views API
+Similar to pull, but able to configure the number of messages, etc. via PullOptions.
+the name of the stream
+the consumer's durable name (if durable) or name if ephemeral
+Optional
opts: Partial<PullOptions>the name of the stream
-the consumer's durable name (if durable) or name if ephemeral
-Optional
opts: Partial<PullOptions>Returns a JetStreamManager that uses the same JetStreamOptions +
Returns a JetStreamManager that uses the same JetStreamOptions as the current JetStream context
-Optional
checkAPI: booleanPublishes a message to a stream. If not stream is configured to store the message, the -request will fail with NoResponders error.
-the subject for the message
-Optional
payload: Payloadthe message's data
-Optional
options: Partial<JetStreamPublishOptions>the optional message
-Optional
checkAPI: booleanPublishes a message to a stream. If not stream is configured to store the message, the +request will fail with ErrorCode.NoResponders error.
+the subject for the message
+Optional
payload: Payloadthe message's data
+Optional
options: Partial<JetStreamPublishOptions>the optional message
+Retrieves a single message from JetStream
+the name of the stream
+the consumer's durable name (if durable) or name if ephemeral
+Optional
expires: numberthe number of milliseconds to wait for a message
+the name of the stream
-the consumer's durable name (if durable) or name if ephemeral
-Optional
expires: numberthe number of milliseconds to wait for a message
-Creates a pull subscription. A pull subscription relies on the client to request more +
Creates a pull subscription. A pull subscription relies on the client to request more messages from the server. If the consumer doesn't exist, it will be created matching the consumer options provided.
It is recommended that a consumer be created first using JetStreamManager APIs and then use the bind option to simply attach to the created consumer.
If the filter subject is not specified in the options, the filter will be set to match the specified subject.
-It is more efficient than fetch or pull because +
It is more efficient than fetch or pull because a single subscription is used between invocations.
- -a subject used to locate the stream
+a subject used to locate the stream
-Creates a push subscription. The JetStream server feeds messages to this subscription +
Creates a push subscription. The JetStream server feeds messages to this subscription without the client having to request them. The rate at which messages are provided can -be tuned by the consumer by specifying ConsumerConfig.rate_limit_bps and/or -maxAckPending.
+be tuned by the consumer by specifying ConsumerConfig.rate_limit_bps and/or +maxAckPending.It is recommended that a consumer be created first using JetStreamManager APIs and then use the bind option to simply attach to the created consumer.
If the filter subject is not specified in the options, the filter will be set to match the specified subject.
- -a subject used to locate the stream
+a subject used to locate the stream
-Generated using TypeDoc
The API for interacting with JetStream resources
-JetStream API to interact with Consumers
-JetStream API to interact with Streams
-Returns JetStreamAccountStats for the current client account.
-Returns the JetStreamOptions used to create this +
The API for interacting with JetStream resources
+JetStream API to interact with Consumers
+JetStream API to interact with Streams
+Returns JetStreamAccountStats for the current client account.
+Returns the JetStreamOptions used to create this JetStreamManager
-Returns a JetStreamClient created using the same +
Returns a JetStreamClient created using the same options as this JetStreamManager
-Generated using TypeDoc
Options to a JetStream options applied to all JetStream or JetStreamManager requests.
-Optional
apiPrefix required to interact with JetStream. Must match +
Options to a JetStream options applied to all JetStream or JetStreamManager requests.
+Optional
apiPrefix required to interact with JetStream. Must match server configuration.
-Optional
checkAPIAllows disabling a check on the account for JetStream enablement see -().
-Optional
domainName of the JetStream domain. This value automatically modifies +
Optional
checkAPIAllows disabling a check on the account for JetStream enablement see +().
+Optional
domainName of the JetStream domain. This value automatically modifies the default JetStream apiPrefix.
-Optional
timeoutNumber of milliseconds to wait for a JetStream API request.
- -ConnectionOptions.timeout
- -ConnectionOptions.timeout
-Generated using TypeDoc
Optional
timeoutNumber of milliseconds to wait for a JetStream API request.
+ConnectionOptions.timeout
+
+ConnectionOptions.timeout
+Options to a JetStream options applied to all JetStream or JetStreamManager requests.
-Optional
apiPrefix required to interact with JetStream. Must match +
Options to a JetStream options applied to all JetStream or JetStreamManager requests.
+Optional
apiPrefix required to interact with JetStream. Must match server configuration.
-Optional
domainName of the JetStream domain. This value automatically modifies +
Optional
domainName of the JetStream domain. This value automatically modifies the default JetStream apiPrefix.
-Optional
timeoutNumber of milliseconds to wait for a JetStream API request.
- -ConnectionOptions.timeout
- -ConnectionOptions.timeout
-Generated using TypeDoc
Optional
timeoutNumber of milliseconds to wait for a JetStream API request.
+ConnectionOptions.timeout
+
+ConnectionOptions.timeout
+Options for messages published to JetStream
-Set of constraints that when specified are verified by the server. +
Options for messages published to JetStream
+Set of constraints that when specified are verified by the server. If the constraint(s) doesn't match, the server will reject the message. These settings allow you to implement deduplication and consistency strategies.
-Headers associated with the message. You can create an instance of +
The expected last msgID of the last message received by the stream.
+The expected last sequence on the stream.
+The expected last sequence on the stream for a message with this subject
+The expected stream capturing the message
+Headers associated with the message. You can create an instance of MsgHdrs with the headers() function.
-A string identifier used to detect duplicate published messages. +
The number of milliseconds to wait for the PubAck
-Generated using TypeDoc
The number of milliseconds to wait for the PubAck
+"Number of active Consumers
-Memory Storage being used for Stream Message storage
-File Storage being used for Stream Message storage
-Number of active Streams
-Generated using TypeDoc
"Number of active Consumers
+Memory Storage being used for Stream Message storage
+File Storage being used for Stream Message storage
+Number of active Streams
+Represents a message stored in JetStream
-The message's data
-Any headers associated with the message
-The delivery info for the message
-True if the message was redelivered
-The sequence number for the message
-The subject on which the message was published
-Indicate to the JetStream server that the message was processed +
Represents a message stored in JetStream
+The message's data
+Any headers associated with the message
+The delivery info for the message
+True if the message was redelivered
+The sequence number for the message
+The subject on which the message was published
+Indicate to the JetStream server that processing of the message +
!! this is an experimental feature - and could be removed
+Optional
millis: number!! this is an experimental feature - and could be removed
next() combines ack() and pull(), requires the subject for a subscription processing to process a message is provided (can be the same) however, because the ability to specify @@ -165,98 +38,13 @@
Optional
ro: Partial<PullOptions>Convenience method to parse the message payload as string. This method +
Optional
ro: Partial<PullOptions>Indicate to the JetStream server that processing of the message failed and that the message should not be sent to the consumer again.
-Optional
reason: stringis a string describing why the message was termed. Note +
Optional
reason: stringis a string describing why the message was termed. Note
that reason
is only available on servers 2.11.0 or better.
Generated using TypeDoc
Generated using TypeDoc
Creates a new entry ensuring that the entry does not exist (or +
Creates a new entry ensuring that the entry does not exist (or the current version is deleted or the key is purged) If the entry already exists, this operation fails.
-Deletes the entry stored under the specified key. +
Deletes the entry stored under the specified key. Deletes are soft-deletes. The server will add a new entry marked by a "DEL" operation. Note that if the KV was created with an underlying limit (such as a TTL on keys) it is possible for a key or the soft delete marker to be removed without additional notification on a watch.
-Optional
opts: Partial<KvDeleteOptions>Destroys the underlying stream used by the KV. This +
Optional
opts: Partial<KvDeleteOptions>Returns the KvEntry stored under the key if it exists or null if not. +
Returns the KvEntry stored under the key if it exists or null if not. Note that the entry returned could be marked with a "DEL" or "PURGE" operation which signifies the server stored the value, but it is now deleted.
-Optional
opts: { Returns an iterator of the specified key's history (or all keys).
-Optional
opts: { Optional
key?: stringReturns an iterator of all the keys optionally matching +
Optional
opts: { Returns an iterator of the specified key's history (or all keys). +Note you can specify multiple keys if running on server 2.10.x or better.
+Optional
opts: { Optional
key?: string | string[]Returns an iterator of all the keys optionally matching the specified filter.
-Optional
filter: stringDeletes and purges the specified key and any value +
Optional
filter: string | string[]default to all keys
+Deletes and purges the specified key and any value history.
-Optional
opts: Partial<KvDeleteOptions>Sets or updates the value stored under the specified key.
-Optional
opts: Partial<KvPutOptions>Updates the existing entry provided that the previous sequence +
Optional
opts: Partial<KvDeleteOptions>Sets or updates the value stored under the specified key.
+Optional
opts: Partial<KvPutOptions>Updates the existing entry provided that the previous sequence for the Kv is at the specified version. This ensures that the KV has not been modified prior to the update.
-Returns an iterator that will yield KvEntry updates as they happen.
-Optional
opts: KvWatchOptionsGenerated using TypeDoc
Returns an iterator that will yield KvEntry updates as they happen.
+Optional
opts: KvWatchOptionsAn interface for encoding and decoding values +
Generated using TypeDoc
Generated using TypeDoc
If set the KV must be at the current sequence or the +
Generated using TypeDoc
Optional
deltaConvenience method to parse the entry payload as JSON. This method +
Optional
deltaConvenience method to parse the entry payload as string. This method +
Generated using TypeDoc
deprecated: use storage +
deprecated: use storage FIXME: remove this on 1.8
-Optional
compressionSets the compression level of the KV. This feature is only supported in +
Optional
compressionSets the compression level of the KV. This feature is only supported in servers 2.10.x and better.
-Sets the specified description on the stream of the KV.
-Number of maximum messages allowed per subject (key).
-use max_bytes
-The maximum size of a value on the KV
-The maximum number of bytes on the KV
-Optional
mirrorMaintains a 1:1 mirror of another kv stream with name matching this property.
-Placement hints for the stream hosting the KV
-@deprecated: use placement
-Number of replicas for the KV (1,3,or 5).
-Republishes edits to the KV on a NATS core subject.
-Optional
sourcesList of Stream names to replicate into this KV
-The backing store of the stream hosting the KV
-The maximum number of millis the key should live +
Sets the specified description on the stream of the KV.
+Number of maximum messages allowed per subject (key).
+use max_bytes
+The maximum size of a value on the KV
+The maximum number of bytes on the KV
+Optional
mirrorMaintains a 1:1 mirror of another kv stream with name matching this property.
+Placement hints for the stream hosting the KV
+@deprecated: use placement
+Number of replicas for the KV (1,3,or 5).
+Republishes edits to the KV on a NATS core subject.
+Optional
sourcesList of Stream names to replicate into this KV
+The backing store of the stream hosting the KV
+The maximum number of millis the key should live in the KV. The server will automatically remove keys older than this amount. Note that deletion of delete markers are not performed.
-Generated using TypeDoc
If true and on a recent server, changes the way the KV +
If true and on a recent server, changes the way the KV retrieves values. This option is significantly faster, but has the possibility of inconsistency during a read.
-deprecated: use storage +
deprecated: use storage FIXME: remove this on 1.8
-Doesn't attempt to create the KV stream if it doesn't exist.
-An encoder/decoder for keys and values
-Optional
compressionSets the compression level of the KV. This feature is only supported in +
Doesn't attempt to create the KV stream if it doesn't exist.
+An encoder/decoder for keys and values
+Optional
compressionSets the compression level of the KV. This feature is only supported in servers 2.10.x and better.
-Sets the specified description on the stream of the KV.
-Number of maximum messages allowed per subject (key).
-use max_bytes
-The maximum size of a value on the KV
-The maximum number of bytes on the KV
-Optional
metadataMetadata field to store additional information about the kv. Note that +
Sets the specified description on the stream of the KV.
+Number of maximum messages allowed per subject (key).
+use max_bytes
+The maximum size of a value on the KV
+The maximum number of bytes on the KV
+Optional
metadataMetadata field to store additional information about the kv. Note that
keys starting with _nats
are reserved. This feature only supported on servers
2.10.x and better.
Optional
mirrorMaintains a 1:1 mirror of another kv stream with name matching this property.
-Placement hints for the stream hosting the KV
-@deprecated: use placement
-Number of replicas for the KV (1,3,or 5).
-Republishes edits to the KV on a NATS core subject.
-Optional
sourcesList of Stream names to replicate into this KV
-The backing store of the stream hosting the KV
-The underlying stream name for the KV
-How long to wait in milliseconds for a response from the KV
-The maximum number of millis the key should live +
Optional
mirrorMaintains a 1:1 mirror of another kv stream with name matching this property.
+Placement hints for the stream hosting the KV
+@deprecated: use placement
+Number of replicas for the KV (1,3,or 5).
+Republishes edits to the KV on a NATS core subject.
+Optional
sourcesList of Stream names to replicate into this KV
+The backing store of the stream hosting the KV
+The underlying stream name for the KV
+How long to wait in milliseconds for a response from the KV
+The maximum number of millis the key should live in the KV. The server will automatically remove keys older than this amount. Note that deletion of delete markers are not performed.
-Generated using TypeDoc
If set the KV must be at the current sequence or the +
Generated using TypeDoc
deprecated: use storage +
deprecated: use storage FIXME: remove this on 1.8
-The simple name for a Kv - this name is typically prefixed by KV_
.
FIXME: remove this on 1.8
-Optional
compressionSets the compression level of the KV. This feature is only supported in +
The simple name for a Kv - this name is typically prefixed by KV_
.
FIXME: remove this on 1.8
+Optional
compressionSets the compression level of the KV. This feature is only supported in servers 2.10.x and better.
-Sets the specified description on the stream of the KV.
-Number of maximum messages allowed per subject (key).
-use max_bytes
-The maximum size of a value on the KV
-The maximum number of bytes on the KV
-Optional
metadataMetadata field to store additional information about the stream. Note that +
Sets the specified description on the stream of the KV.
+Number of maximum messages allowed per subject (key).
+use max_bytes
+The maximum size of a value on the KV
+The maximum number of bytes on the KV
+Optional
metadataMetadata field to store additional information about the stream. Note that
keys starting with _nats
are reserved. This feature only supported on servers
2.10.x and better.
Optional
mirrorMaintains a 1:1 mirror of another kv stream with name matching this property.
-Placement hints for the stream hosting the KV
-@deprecated: use placement
-Number of replicas for the KV (1,3,or 5).
-Republishes edits to the KV on a NATS core subject.
-Size of the bucket in bytes
-Optional
sourcesList of Stream names to replicate into this KV
-The backing store of the stream hosting the KV
-The StreamInfo backing up the KV
-The maximum number of millis the key should live +
Optional
mirrorMaintains a 1:1 mirror of another kv stream with name matching this property.
+Placement hints for the stream hosting the KV
+@deprecated: use placement
+Number of replicas for the KV (1,3,or 5).
+Republishes edits to the KV on a NATS core subject.
+Size of the bucket in bytes
+Optional
sourcesList of Stream names to replicate into this KV
+The backing store of the stream hosting the KV
+The StreamInfo backing up the KV
+The maximum number of millis the key should live in the KV. The server will automatically remove keys older than this amount. Note that deletion of delete markers are not performed.
-Number of entries in the KV
-Generated using TypeDoc
Number of entries in the KV
+Generated using TypeDoc
Generated using TypeDoc
An interface for listing. Returns a promise with typed list.
+Generated using TypeDoc
Represents a message delivered by NATS. This interface is used by +
Represents a message delivered by NATS. This interface is used by Subscribers.
-The message's data (or payload)
-Optional
headersPossible headers that may have been set by the server or the publisher.
-Optional
replyA possible subject where the recipient may publish a reply (in the cases +
The message's data (or payload)
+Optional
headersPossible headers that may have been set by the server or the publisher.
+Optional
replyA possible subject where the recipient may publish a reply (in the cases where the message represents a request).
-The subscription ID where the message was dispatched.
-The subject the message was sent to
-Convenience method to parse the message payload as JSON. This method +
The subscription ID where the message was dispatched.
+The subject the message was sent to
+Convenience to publish a response to the reply subject in the +
Optional
reviver: ReviverFna reviver function
+Convenience to publish a response to the reply subject in the
message - this is the same as doing nc.publish(msg.reply, ...)
.
Optional
payload: PayloadOptional
opts: PublishOptionsConvenience method to parse the message payload as string. This method +
Optional
payload: PayloadOptional
opts: PublishOptionsGenerated using TypeDoc
Optional
no_Default will securely remove a message and rewrite the data with random data, +
Optional
no_Default will securely remove a message and rewrite the data with random data, set this to true to only remove the message
-Stream sequence number of the message to retrieve
-Generated using TypeDoc
Stream sequence number of the message to retrieve
+Generated using TypeDoc
Optional
match: MatchOptional
match: MatchOptional
match: MatchOptional
match: MatchOptional
match: MatchOptional
match: MatchOptional
match: MatchGenerated using TypeDoc
Optional
infoServerInfo to the currently connected server or undefined
-Returns a ServicesAPI which allows you to build services +
Optional
infoServerInfo to the currently connected server or undefined
+Returns a ServicesAPI which allows you to build services using NATS.
-Initiates a drain on the connection and returns a promise that resolves when the drain completes and the connection closes.
Drain is an ordered shutdown of the client. Instead of abruptly closing the client, subscriptions are drained, that is messages not yet processed by a subscription are handled before the subscription is closed. After subscriptions are drained it is not possible to create a new subscription. Then all pending outbound messages are sent to the server. Finally, the connection is closed.
-Returns a JetStreamClient which allows publishing messages to +
Returns a JetStreamClient which allows publishing messages to JetStream or consuming messages from streams.
-Optional
opts: JetStreamOptions | JetStreamManagerOptionsReturns a Promise to a JetStreamManager which allows the client +
Optional
opts: JetStreamOptions | JetStreamManagerOptionsReturns a Promise to a JetStreamManager which allows the client to access Streams and Consumers information.
-Optional
opts: JetStreamManagerOptionsPublishes the specified data to the specified subject.
-Optional
payload: PayloadOptional
options: PublishOptionsUse of this API is experimental, and it is subject to be removed.
+Optional
opts: JetStreamManagerOptionsPublishes the specified data to the specified subject.
+Optional
payload: PayloadOptional
options: PublishOptionsPublishes using the subject of the specified message, specifying the +data, headers and reply found in the message if any.
+Use of this API is experimental, and it is subject to be removed.
reconnect() enables a client to force a reconnect. A reconnect will disconnect the client, and possibly initiate a reconnect to the cluster. Note that all reconnect caveats apply:
@@ -224,152 +64,23 @@Publishes a request with specified data in the specified subject expecting a -response before timeout milliseconds. The api returns a +
Publishes a request with specified data in the specified subject expecting a +response before RequestOptions#timeout milliseconds. The api returns a Promise that resolves when the first response to the request is received. If there are no responders (a subscription) listening on the request subject, the request will fail as soon as the server processes it.
-Optional
payload: PayloadOptional
opts: RequestOptionsPublishes a request expecting multiple responses back. Several strategies +
Optional
payload: PayloadOptional
opts: RequestOptionsPublishes a request expecting multiple responses back. Several strategies to determine when the request should stop gathering responses.
-Optional
payload: PayloadOptional
opts: Partial<RequestManyOptions>the number of milliseconds it took for a flush.
-Returns some metrics such as the number of messages and bytes +
Optional
payload: PayloadOptional
opts: Partial<RequestManyOptions>Replies using the reply subject of the specified message, specifying the +data, headers in the message if any.
+the number of milliseconds it took for a flush.
+Subscribe expresses interest in the specified subject. The subject may -have wildcards. Messages are delivered to the SubscriptionOptions callback -if specified. Otherwise, the subscription is an async iterator for Msg.
-Optional
opts: SubscriptionOptionsGenerated using TypeDoc
an AsyncIterable
Subscribe expresses interest in the specified subject. The subject may +have wildcards. Messages are delivered to the SubscriptionOptions callback +if specified. Otherwise, the subscription is an async iterator for Msg.
+Optional
opts: SubscriptionOptionsThe name of the bucket where the object is stored.
-The number of entries storing the object.
-True if the object was deleted.
-Optional
descriptionA cryptographic checksum of the data as a whole.
-Optional
headersOptional
metadataAn UTC timestamp
-The current ID of the entries holding the data for the object.
-Optional
optionsThe revision number for the entry
-The size in bytes of the object.
-Generated using TypeDoc
The name of the bucket where the object is stored.
+The number of entries storing the object.
+True if the object was deleted.
+Optional
descriptionA cryptographic checksum of the data as a whole.
+Optional
headersOptional
metadataAn UTC timestamp
+The current ID of the entries holding the data for the object.
+Optional
optionsThe revision number for the entry
+The size in bytes of the object.
+Deletes the specified entry from the object store.
-Returns an object you can use for reading the data from the +
Deletes the specified entry from the object store.
+Returns an object you can use for reading the data from the named stored object or null if the entry doesn't exist.
-Returns the ObjectInfo of the named entry. Or null if the +
Returns the ObjectInfo of the named entry. Or null if the entry doesn't exist.
-Adds a link to another object in the same store or a different one. +
Adds a link to another object in the same store or a different one. Note that links of links are rejected. object.
-Add a link to another object store
-Returns a list of the entries in the ObjectStore
-Adds an object to the store with the specified meta +
Add a link to another object store
+Returns a list of the entries in the ObjectStore
+Adds an object to the store with the specified meta and using the specified ReadableStream to stream the data.
-Optional
opts: ObjectStorePutOptsPuts the specified bytes into the store with the specified meta.
-Optional
opts: ObjectStorePutOptsSeals the object store preventing any further modifications.
-Returns the runtime status of the object store.
-Optional
opts: Partial<StreamInfoRequestOptions>Update the metadata for an object. If the name is modified, the object +
Optional
opts: ObjectStorePutOptsPuts the specified bytes into the store with the specified meta.
+Optional
opts: ObjectStorePutOptsSeals the object store preventing any further modifications.
+Returns the runtime status of the object store.
+Optional
opts: Partial<StreamInfoRequestOptions>Update the metadata for an object. If the name is modified, the object is effectively renamed and will only be accessible by its new name.
-Watch an object store and receive updates of modifications via +
Watch an object store and receive updates of modifications via an iterator.
-Optional
opts: Partial<{ Generated using TypeDoc
Optional
opts: Partial<{ Nanoseconds since this peer was last seen
-Indicates if the server is up-to-date and synchronised
-How many uncommitted operations this peer is behind the leader
-The server name of the peer
-Indicates the node is considered offline by the group
-Generated using TypeDoc
Nanoseconds since this peer was last seen
+Indicates if the server is up-to-date and synchronised
+How many uncommitted operations this peer is behind the leader
+The server name of the peer
+Indicates the node is considered offline by the group
+Generated using TypeDoc
The response returned by the JetStream server when a message is added to a stream.
-Optional
domainThe domain of the JetStream
-True if the message is a duplicate
-The sequence number of the message as stored in JetStream
-The name of the stream
-Generated using TypeDoc
The response returned by the JetStream server when a message is added to a stream.
+Optional
domainThe domain of the JetStream
+True if the message is a duplicate
+The sequence number of the message as stored in JetStream
+The name of the stream
+Optional
headersOptional headers to include with the message.
-Optional
replyAn optional subject where a response should be sent. +
Generated using TypeDoc
Options for a JetStream pull subscription which define how long +
Options for a JetStream pull subscription which define how long the pull request will remain open and limits the amount of data that the server could return.
-Max number of messages to retrieve in a pull.
-If set, the number of milliseconds to wait for the number of messages -specified in batch
-If set, the max number of bytes to receive. The server will limit the +
Max number of messages to retrieve in a pull.
+If set, the number of milliseconds to wait for the number of messages +specified in batch
+If set, the max number of bytes to receive. The server will limit the number of messages in the batch to fit within this setting.
-If true, the request for messages will end when received by the server
-Generated using TypeDoc
If true, the request for messages will end when received by the server
+Sends a request from the client requesting the server for more messages.
-Optional
opts: Partial<PullOptions>Generated using TypeDoc
Sends a request from the client requesting the server for more messages.
+Optional
opts: Partial<PullOptions>Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
headersOptional
jitterOptional
maxOptional
noGenerated using TypeDoc
Optional
headersOptional
jitterOptional
maxOptional
noOptional
headersMsgHdrs to include with the request.
-Optional
noIf true, the request API will create a regular NATS subscription +
Optional
headersMsgHdrs to include with the request.
+Optional
noIf true, the request API will create a regular NATS subscription to process the response. Otherwise a shared muxed subscriptions is -used. Requires reply
-Optional
replyThe subject where the response should be sent to. Requires noMux
-number of milliseconds before the request will timeout.
-Generated using TypeDoc
Optional
replyThe subject where the response should be sent to. Requires noMux
+number of milliseconds before the request will timeout.
+Returns the KvEntry stored under the key if it exists or null if not. +
Returns the KvEntry stored under the key if it exists or null if not. Note that the entry returned could be marked with a "DEL" or "PURGE" operation which signifies the server stored the value, but it is now deleted.
-Optional
opts: { Returns an iterator of the specified key's history (or all keys).
-Optional
opts: { Optional
key?: stringReturns an iterator of all the keys optionally matching +
Optional
opts: { Returns an iterator of the specified key's history (or all keys). +Note you can specify multiple keys if running on server 2.10.x or better.
+Optional
opts: { Optional
key?: string | string[]Returns an iterator of all the keys optionally matching the specified filter.
-Optional
filter: stringReturns an iterator that will yield KvEntry updates as they happen.
-Optional
opts: KvWatchOptionsGenerated using TypeDoc
Optional
filter: string | string[]default to all keys
+Returns an iterator that will yield KvEntry updates as they happen.
+Optional
opts: KvWatchOptionsStream sequence number of the message to retrieve
-Generated using TypeDoc
Generated using TypeDoc
ServerInfo represents information from the connected server
-Optional
auth_True if the server requires authentication
-Server-assigned client_id
-Optional
client_The client's IP as seen by the server
-Optional
clusterThe name or ID of the cluster
-Optional
connect_Other servers available on the connected cluster
-Optional
git_Git commit information on the built server binary
-Version information on the Go stack used to build the server binary
-Optional
headersTrue if the server supports headers
-Hostname of the connected server
-Optional
jetstreamTrue if the server supports JetStream
-Optional
ldmTrue if the server is in Lame Duck Mode
-Max number of bytes in message that can be sent to the server
-Optional
nonceIf the server required nkey or JWT authentication the nonce used during authentication.
-The port where the server is listening
-Version number of the NATS protocol
-The ID of the server
-The name of the server
-Optional
tls_True if TLS is available
-Optional
tls_True if TLS connections are required
-Optional
tls_True if TLS client certificate verification is required
-The nats-server version
-Generated using TypeDoc
ServerInfo represents information from the connected server
+Optional
auth_True if the server requires authentication
+Server-assigned client_id
+Optional
client_The client's IP as seen by the server
+Optional
clusterThe name or ID of the cluster
+Optional
connect_Other servers available on the connected cluster
+Optional
git_Git commit information on the built server binary
+Version information on the Go stack used to build the server binary
+Optional
headersTrue if the server supports headers
+Hostname of the connected server
+Optional
jetstreamTrue if the server supports JetStream
+Optional
ldmTrue if the server is in Lame Duck Mode
+Max number of bytes in message that can be sent to the server
+Optional
nonceIf the server required nkey or JWT authentication the nonce used during authentication.
+The port where the server is listening
+Version number of the NATS protocol
+The ID of the server
+The name of the server
+Optional
tls_True if TLS is available
+Optional
tls_True if TLS connections are required
+Optional
tls_True if TLS client certificate verification is required
+The nats-server version
+Generated using TypeDoc
True if the service is stopped
-A promise that gets resolved to null or Error once the service ends. +
True if the service is stopped
+A promise that gets resolved to null or Error once the service ends. If an error, then service exited because of an error.
-The name of the endpoint must be a simple subject token with no wildcards
-Optional
opts: ServiceHandler | Partial<Endpoint>is either a handler or a more complex options which allows a +
The name of the endpoint must be a simple subject token with no wildcards
+Optional
opts: ServiceHandler | Partial<Endpoint>is either a handler or a more complex options which allows a subject, handler, and/or schema
-A group is a subject prefix from which endpoints can be added. +
A group is a subject prefix from which endpoints can be added. Can be empty to allow for prefixes or tokens that are set at runtime without requiring editing of the service. Note that an optional queue can be specified, all endpoints added to the group, will use the specified queue unless the endpoint overrides it. -see EndpointOptions and ServiceConfig.
-Optional
subject: stringOptional
queue: stringReturns a service info for the service
-Returns the identity used by this service
-Returns the stats for the service.
-Stop the service returning a promise once the service completes. +see EndpointOptions and ServiceConfig.
+Optional
subject: stringOptional
queue: stringReturns a service info for the service
+Returns the identity used by this service
+Returns the stats for the service.
+Generated using TypeDoc
Optional
err: ErrorRequests info from services
-Optional
name: stringOptional
id: stringPings services
-Optional
name: stringoptional
-Optional
id: stringoptional
-Requests all the stats from services
-Optional
name: stringOptional
id: stringGenerated using TypeDoc
Requests info from services
+Optional
name: stringOptional
id: stringPings services
+Optional
name: stringoptional
+Optional
id: stringoptional
+Requests all the stats from services
+Optional
name: stringOptional
id: stringThe name of the endpoint must be a simple subject token with no wildcards
-Optional
opts: ServiceHandler | Partial<Endpoint>is either a handler or a more complex options which allows a +
The name of the endpoint must be a simple subject token with no wildcards
+Optional
opts: ServiceHandler | Partial<Endpoint>is either a handler or a more complex options which allows a subject, handler, and/or schema
-A group is a subject prefix from which endpoints can be added. +
A group is a subject prefix from which endpoints can be added. Can be empty to allow for prefixes or tokens that are set at runtime without requiring editing of the service. Note that an optional queue can be specified, all endpoints added to the group, will use the specified queue unless the endpoint overrides it. -see EndpointOptions and ServiceConfig.
-Optional
subject: stringOptional
queue: stringGenerated using TypeDoc
Optional
subject: stringOptional
queue: stringRepresents a message delivered by NATS. This interface is used by +
Represents a message delivered by NATS. This interface is used by Subscribers.
-The message's data (or payload)
-Optional
headersPossible headers that may have been set by the server or the publisher.
-Optional
replyA possible subject where the recipient may publish a reply (in the cases +
The message's data (or payload)
+Optional
headersPossible headers that may have been set by the server or the publisher.
+Optional
replyA possible subject where the recipient may publish a reply (in the cases where the message represents a request).
-The subscription ID where the message was dispatched.
-The subject the message was sent to
-Convenience method to parse the message payload as JSON. This method +
The subscription ID where the message was dispatched.
+The subject the message was sent to
+Convenience to publish a response to the reply subject in the +
Optional
reviver: ReviverFna reviver function
+Convenience to publish a response to the reply subject in the
message - this is the same as doing nc.publish(msg.reply, ...)
.
Optional
payload: PayloadOptional
opts: PublishOptionsOptional
data: Uint8ArrayOptional
opts: PublishOptionsConvenience method to parse the message payload as string. This method +
Optional
payload: PayloadOptional
opts: PublishOptionsOptional
data: Uint8ArrayOptional
opts: PublishOptionsGenerated using TypeDoc
Response type schema
-Generated using TypeDoc
Adds a Service
-Returns a ServiceClient that can be used to interact with the +
Adds a Service
+Returns a ServiceClient that can be used to interact with the observability aspects of the service (discovery, monitoring)
-Optional
opts: RequestManyOptionsOptional
prefix: stringGenerated using TypeDoc
Optional
opts: RequestManyOptionsOptional
prefix: stringNumber of bytes received by the client.
-Number of messages received by the client.
-Number of bytes sent by the client.
-Number of messages sent by the client.
-Generated using TypeDoc
Number of bytes received by the client.
+Number of messages received by the client.
+Number of bytes sent by the client.
+Number of messages sent by the client.
+Generated using TypeDoc
Optional
permissionAn interface representing a message that retrieved directly from JetStream.
-The payload of the message body
-Headers for the message
-The sequence number of the message in the Stream
-The subject the message was originally received on
-The time the message was received
-The raw ISO formatted date returned by the server
-Convenience method to parse the message payload as JSON. This method +
An interface representing a message that retrieved directly from JetStream.
+The payload of the message body
+Headers for the message
+The sequence number of the message in the Stream
+The subject the message was originally received on
+The time the message was received
+The raw ISO formatted date returned by the server
+Generated using TypeDoc
Optional
name: string | Partial<OrderedConsumerOptions>Optional
cached: booleanOptional
opts: Partial<StreamInfoRequestOptions>Generated using TypeDoc
Optional
name: string | Partial<OrderedConsumerOptions>Optional
cached: booleanOptional
opts: Partial<StreamInfoRequestOptions>Adds a new stream with the specified stream configuration.
-Retrieves the message matching the specified query. Messages can be +
Adds a new stream with the specified stream configuration.
+Retrieves the message matching the specified query. Messages can be retrieved by sequence number or by last sequence matching a subject.
-Returns the information about the specified stream
-Optional
opts: Partial<StreamInfoRequestOptions>Lists all streams stored by JetStream
-Optional
subject: stringonly return streams that include the specified subject
-Returns a list of KvStatus for all streams that are identified as +
Returns the information about the specified stream
+Optional
opts: Partial<StreamInfoRequestOptions>Lists all streams stored by JetStream
+Optional
subject: stringonly return streams that include the specified subject
+Returns a list of ObjectStoreInfo for all streams that are identified as +
Returns a list of ObjectStoreInfo for all streams that are identified as
being a ObjectStore (that is having names that have the prefix OBJ_
)
Return a Lister of stream names
-Optional
subject: stringif specified, the results are filtered to streams that contain the +
Purges messages from a stream that match the specified purge options.
-Optional
opts: PurgeOptsUpdates the stream configuration for the specified stream.
-Generated using TypeDoc
Purges messages from a stream that match the specified purge options.
+Optional
opts: PurgeOptsUpdates the stream configuration for the specified stream.
+An alternate location to read mirrored data
-The name of the cluster holding the Stream
-The domain holding the Stream
-The mirror Stream name
-Generated using TypeDoc
An alternate location to read mirrored data
+The name of the cluster holding the Stream
+The domain holding the Stream
+The mirror Stream name
+Stream options that can be updated
-Allow higher performance, direct access to get individual messages via the $JS.DS.GET API
-Allows the use of the RollupHdr header to replace all contents of a stream, +
Stream options that can be updated
+Allow higher performance, direct access to get individual messages via the $JS.DS.GET API
+Allows the use of the JsHeaders#RollupHdr header to replace all contents of a stream, or subject in a stream, with a single new message
-Optional
compressionSets the compression level of the stream. This feature is only supported in +
Optional
compressionSets the compression level of the stream. This feature is only supported in servers 2.10.x and better.
-Optional
consumer_The consumer limits applied to consumers that don't specify limits +
Optional
consumer_The consumer limits applied to consumers that don't specify limits
for inactive_threshold
or max_ack_pending
. Note that these limits
become an upper bound for all clients.
Restricts the ability to delete messages from a stream via the API. +
Restricts the ability to delete messages from a stream via the API. Cannot be changed once set to true
-Restricts the ability to purge messages from a stream via the API. +
Restricts the ability to purge messages from a stream via the API. Cannot be change once set to true
-Optional
descriptionA short description of the purpose of this stream
-When a Stream reach its limits either old messages are deleted or new ones are denied
-The time window to track duplicate messages for, expressed in nanoseconds. 0 for default -Set msgID to enable duplicate detection.
-Sets the first sequence number used by the stream. This property can only be +
Optional
descriptionA short description of the purpose of this stream
+When a Stream reach its limits either old messages are deleted or new ones are denied
+Sets the context of the on a per subject basis. Requires DiscardPolicy#New as the +discard policy.
+The time window to track duplicate messages for, expressed in nanoseconds. 0 for default +Set JetStreamPublishOptions#msgID to enable duplicate detection.
+Sets the first sequence number used by the stream. This property can only be specified when creating the stream, and likely is not valid on mirrors etc., as it may disrupt the synchronization logic.
-Maximum age of any message in the stream, expressed in nanoseconds. 0 for unlimited.
-How big the Stream may be, when the combined stream size exceeds this old messages are removed. -1 for unlimited.
-How many Consumers can be defined for a given Stream. -1 for unlimited.
-The largest message that will be accepted by the Stream. -1 for unlimited.
-How many messages may be in a Stream, oldest messages will be removed if the Stream exceeds this size. -1 for unlimited.
-For wildcard streams ensure that for every unique subject this many messages are kept - a per subject retention limit
-Optional
metadataMetadata field to store additional information about the stream. Note that +
Maximum age of any message in the stream, expressed in nanoseconds. 0 for unlimited.
+How big the Stream may be, when the combined stream size exceeds this old messages are removed. -1 for unlimited.
+How many Consumers can be defined for a given Stream. -1 for unlimited.
+The largest message that will be accepted by the Stream. -1 for unlimited.
+How many messages may be in a Stream, oldest messages will be removed if the Stream exceeds this size. -1 for unlimited.
+For wildcard streams ensure that for every unique subject this many messages are kept - a per subject retention limit
+Optional
metadataMetadata field to store additional information about the stream. Note that
keys starting with _nats
are reserved. This feature only supported on servers
2.10.x and better.
Optional
mirrorMaintains a 1:1 mirror of another stream with name matching this property. +
Optional
mirrorMaintains a 1:1 mirror of another stream with name matching this property. When a mirror is configured subjects and sources must be empty.
-Allow higher performance, direct access to get individual messages via the $JS.DS.GET API
-A unique name for the Stream
-Optional
no_Disables acknowledging messages that are received by the Stream.
-How many replicas to keep for each message. Min 1, Max 5. Default 1.
-Optional
placementPlacement directives to consider when placing replicas of this stream, random placement when unset
-Optional
republishRules for republishing messages from a stream with subject mapping +
Allow higher performance, direct access to get individual messages via the $JS.DS.GET API
+A unique name for the Stream
+Optional
no_Disables acknowledging messages that are received by the Stream.
+How many replicas to keep for each message. Min 1, Max 5. Default 1.
+Optional
placementPlacement directives to consider when placing replicas of this stream, random placement when unset
+Optional
republishRules for republishing messages from a stream with subject mapping onto new subjects for partitioning and more
-How messages are retained in the Stream, once this is exceeded old messages are removed.
-Sealed streams do not allow messages to be deleted via limits or API, +
How messages are retained in the Stream, once this is exceeded old messages are removed.
+Sealed streams do not allow messages to be deleted via limits or API, sealed streams can not be unsealed via configuration update. Can only be set on already created streams via the Update API
-Optional
sourcesList of Stream names to replicate into this Stream
-The storage backend to use for the Stream.
-Optional
subject_Apply a subject transform to incoming messages before doing anything else. +
Optional
sourcesList of Stream names to replicate into this Stream
+The storage backend to use for the Stream.
+Optional
subject_Apply a subject transform to incoming messages before doing anything else. This feature only supported on 2.10.x and better.
-A list of subjects to consume, supports wildcards. Must be empty when a mirror is configured. May be empty when sources are configured.
-Generated using TypeDoc
A list of subjects to consume, supports wildcards. Must be empty when a mirror is configured. May be empty when sources are configured.
+Sets default consumer limits for inactive_threshold and max_ack_pending +
Sets default consumer limits for inactive_threshold and max_ack_pending to consumers of this stream that don't specify specific values. This functionality requires a server 2.10.x or better.
-Optional
inactive_The default inactive_threshold
applied to consumers.
-This value is specified in nanoseconds. Pleause use the nanos()
+
Optional
inactive_The default inactive_threshold
applied to consumers.
+This value is specified in nanoseconds. Please use the nanos()
function to convert between millis and nanoseconds. Or millis()
to convert a nanosecond value to millis.
Optional
max_The default max_ack_pending
applied to consumers of the stream.
Generated using TypeDoc
Optional
max_The default max_ack_pending
applied to consumers of the stream.
Stream configuration info
-Optional
alternatesAlternates for a stream if applicable. Alternates are listed +
Stream configuration info
+Optional
alternatesAlternates for a stream if applicable. Alternates are listed in order of TTL. With streams at the start of the Array potentially closer and faster to access.
-Optional
clusterCluster information for the stream if applicable
-The active configuration for the Stream
-The ISO Timestamp when the stream was created
-Optional
mirrorInformation about an upstream stream source in a mirror
-Optional
sourcesSources for the Stream if applicable
-Detail about the current State of the Stream
-Optional
tsThe ISO timestamp when the StreamInfo was generated. This field is only available +
Optional
clusterCluster information for the stream if applicable
+The active configuration for the Stream
+The ISO Timestamp when the stream was created
+Optional
mirrorInformation about an upstream stream source in a mirror
+Optional
sourcesSources for the Stream if applicable
+Detail about the current State of the Stream
+Optional
tsThe ISO timestamp when the StreamInfo was generated. This field is only available on servers 2.10.x or better
-Generated using TypeDoc
Generated using TypeDoc
Optional
domainThis field is a convenience for setting up an ExternalStream. +
Optional
domainThis field is a convenience for setting up an ExternalStream. If set, the value here is used to calculate the JetStreamAPI prefix. This field is never serialized to the server. This value cannot be set if external is set.
-Optional
externalThis value cannot be set if domain is set
-Optional
filter_An optional filter subject. If the filter matches the message will be +
Optional
externalThis value cannot be set if domain is set
+Optional
filter_An optional filter subject. If the filter matches the message will be on-boarded.
-Name of the stream source
-Optional
opt_An optional start sequence from which to start reading messages
-Optional
opt_An optional start time Date string
-Optional
subject_Apply a subject transforms to sourced messages before doing anything else. +
Name of the stream source
+Optional
opt_An optional start sequence from which to start reading messages
+Optional
opt_An optional start time Date string
+Optional
subject_Apply a subject transforms to sourced messages before doing anything else. This feature only supported on 2.10.x and better.
-Generated using TypeDoc
Information about an upstream stream source in a mirror
-When last the mirror had activity, in nanoseconds. Value will be -1 when there has been no activity.
-Optional
errorA possible error
-How many messages behind the mirror operation is
-The name of the Stream being replicated
-Optional
subject_Apply a subject transforms to sourced messages before doing anything else. +
Information about an upstream stream source in a mirror
+When last the mirror had activity, in nanoseconds. Value will be -1 when there has been no activity.
+Optional
errorA possible error
+How many messages behind the mirror operation is
+The name of the Stream being replicated
+Optional
subject_Apply a subject transforms to sourced messages before doing anything else. This feature only supported on 2.10.x and better.
-Generated using TypeDoc
Combined size of all messages in the Stream
-Number of Consumers attached to the Stream
-IDs of messages that were deleted using the Message Delete API or Interest based streams removing messages out of order -deleted_details is specified on +
Combined size of all messages in the Stream
+Number of Consumers attached to the Stream
+IDs of messages that were deleted using the Message Delete API or Interest based streams removing messages out of order +deleted_details is specified on the request.
-Sequence number of the first message in the Stream
-The ISO timestamp of the first message in the Stream
-Sequence number of the last message in the Stream
-The ISO timestamp of the last message in the Stream
-Messages that were damaged and unrecoverable
-Number of messages stored in the Stream
-The number of deleted messages
-Optional
num_The number of unique subjects held in the stream
-Optional
subjectsSubjects and their message counts when a subjects_filter was set
-Generated using TypeDoc
Sequence number of the first message in the Stream
+The ISO timestamp of the first message in the Stream
+Sequence number of the last message in the Stream
+The ISO timestamp of the last message in the Stream
+Messages that were damaged and unrecoverable
+Number of messages stored in the Stream
+The number of deleted messages
+Optional
num_The number of unique subjects held in the stream
+Optional
subjectsSubjects and their message counts when a subjects_filter was set
+Stream options that can be updated
-Allow higher performance, direct access to get individual messages via the $JS.DS.GET API
-Allows the use of the RollupHdr header to replace all contents of a stream, +
Stream options that can be updated
+Allow higher performance, direct access to get individual messages via the $JS.DS.GET API
+Allows the use of the JsHeaders#RollupHdr header to replace all contents of a stream, or subject in a stream, with a single new message
-Optional
compressionSets the compression level of the stream. This feature is only supported in +
Optional
compressionSets the compression level of the stream. This feature is only supported in servers 2.10.x and better.
-Optional
consumer_The consumer limits applied to consumers that don't specify limits +
Optional
consumer_The consumer limits applied to consumers that don't specify limits
for inactive_threshold
or max_ack_pending
. Note that these limits
become an upper bound for all clients.
Restricts the ability to delete messages from a stream via the API. +
Restricts the ability to delete messages from a stream via the API. Cannot be changed once set to true
-Restricts the ability to purge messages from a stream via the API. +
Restricts the ability to purge messages from a stream via the API. Cannot be change once set to true
-Optional
descriptionA short description of the purpose of this stream
-When a Stream reach its limits either old messages are deleted or new ones are denied
-The time window to track duplicate messages for, expressed in nanoseconds. 0 for default -Set msgID to enable duplicate detection.
-Maximum age of any message in the stream, expressed in nanoseconds. 0 for unlimited.
-How big the Stream may be, when the combined stream size exceeds this old messages are removed. -1 for unlimited.
-The largest message that will be accepted by the Stream. -1 for unlimited.
-How many messages may be in a Stream, oldest messages will be removed if the Stream exceeds this size. -1 for unlimited.
-For wildcard streams ensure that for every unique subject this many messages are kept - a per subject retention limit
-Optional
metadataMetadata field to store additional information about the stream. Note that +
Optional
descriptionA short description of the purpose of this stream
+When a Stream reach its limits either old messages are deleted or new ones are denied
+Sets the context of the on a per subject basis. Requires DiscardPolicy#New as the +discard policy.
+The time window to track duplicate messages for, expressed in nanoseconds. 0 for default +Set JetStreamPublishOptions#msgID to enable duplicate detection.
+Maximum age of any message in the stream, expressed in nanoseconds. 0 for unlimited.
+How big the Stream may be, when the combined stream size exceeds this old messages are removed. -1 for unlimited.
+The largest message that will be accepted by the Stream. -1 for unlimited.
+How many messages may be in a Stream, oldest messages will be removed if the Stream exceeds this size. -1 for unlimited.
+For wildcard streams ensure that for every unique subject this many messages are kept - a per subject retention limit
+Optional
metadataMetadata field to store additional information about the stream. Note that
keys starting with _nats
are reserved. This feature only supported on servers
2.10.x and better.
Allow higher performance, direct access to get individual messages via the $JS.DS.GET API
-Optional
no_Disables acknowledging messages that are received by the Stream.
-How many replicas to keep for each message. Min 1, Max 5. Default 1.
-Optional
placementPlacement directives to consider when placing replicas of this stream, random placement when unset
-Optional
republishRules for republishing messages from a stream with subject mapping +
Allow higher performance, direct access to get individual messages via the $JS.DS.GET API
+Optional
no_Disables acknowledging messages that are received by the Stream.
+How many replicas to keep for each message. Min 1, Max 5. Default 1.
+Optional
placementPlacement directives to consider when placing replicas of this stream, random placement when unset
+Optional
republishRules for republishing messages from a stream with subject mapping onto new subjects for partitioning and more
-Optional
sourcesList of Stream names to replicate into this Stream
-Optional
subject_Apply a subject transform to incoming messages before doing anything else. +
Optional
sourcesList of Stream names to replicate into this Stream
+Optional
subject_Apply a subject transform to incoming messages before doing anything else. This feature only supported on 2.10.x and better.
-A list of subjects to consume, supports wildcards. Must be empty when a mirror is configured. May be empty when sources are configured.
-Generated using TypeDoc
A list of subjects to consume, supports wildcards. Must be empty when a mirror is configured. May be empty when sources are configured.
+Generated using TypeDoc
Basic interface to a Subscription type
-A promise that resolves when the subscription closes
-Drain the subscription, closing it after processing all messages +
Basic interface to a Subscription type
+A promise that resolves when the subscription closes
+Stop the subscription from receiving messages. You can optionally specify that the subscription should stop after the specified number of messages have been received. Note this count is since the lifetime of the subscription.
-Optional
max: numberGenerated using TypeDoc
Optional
max: numberSubscription Options
-Optional
callbackAn optional function that will handle messages. Typically, messages +
Subscription Options
+Optional
callbackAn optional function that will handle messages. Typically, messages are processed via an async iterator on the subscription. If this option is provided, messages are processed by the specified function.
-Optional
maxOptional maximum number of messages to deliver to the subscription +
Optional
maxOptional maximum number of messages to deliver to the subscription before it is auto-unsubscribed.
-Optional
queueOptional queue name (subscriptions on the same subject that use queues +
Optional
queueOptional queue name (subscriptions on the same subject that use queues are horizontally load balanced when part of the same queue).
-Optional
timeoutOptional maximum number of milliseconds before a timer raises an error. This +
Optional
timeoutOptional maximum number of milliseconds before a timer raises an error. This useful to monitor a subscription that is expected to yield messages. The timer is cancelled when the first message is received by the subscription.
-Generated using TypeDoc
Generated using TypeDoc
Readonly
[toAttaches a callback for only the rejection of the Promise.
- -A Promise for the completion of the callback.
-Optional
onrejected: ((reason: any) => TResult | PromiseLike<TResult>)The callback to execute when the Promise is rejected.
-Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The +
Readonly
[toAttaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
- -A Promise for the completion of the callback.
-Optional
onfinally: (() => void)The callback to execute when the Promise is settled (fulfilled or rejected).
-Attaches callbacks for the resolution and/or rejection of the Promise.
- -A Promise for the completion of which ever callback is executed.
-Optional
onfulfilled: ((value: T) => TResult1 | PromiseLike<TResult1>)The callback to execute when the Promise is resolved.
-Optional
onrejected: ((reason: any) => TResult2 | PromiseLike<TResult2>)The callback to execute when the Promise is rejected.
-Generated using TypeDoc
Optional
onfinally: (() => void)The callback to execute when the Promise is settled (fulfilled or rejected).
+A Promise for the completion of the callback.
+Attaches callbacks for the resolution and/or rejection of the Promise.
+A Promise for the completion of which ever callback is executed.
+TlsOptions that can be specified to a client. Note that +
TlsOptions that can be specified to a client. Note that the options are typically runtime specific, so some clients won't support them at all. In other cases they will match to the runtime's TLS options.
If no options are specified, but the argument for TlsOptions is an object, the client is requesting to only use connections that are secured by TLS.
-Optional
caOptional
caOptional
certOptional
certOptional
keyOptional
keyGenerated using TypeDoc
Optional
caOptional
caOptional
certOptional
certOptional
handshakehandshakeFirst option requires the server to be configured with handshakeFirst: true
.
Optional
keyOptional
keyGenerated using TypeDoc
Subscription Options
-Optional
callbackOptional
cleanupOptional
info: unknownOptional
dispatchedOptional
ingestionOptional
maxOptional maximum number of messages to deliver to the subscription +
Subscription Options
+Optional
callbackAn optional function that will handle messages. Typically, messages +are processed via an async iterator on the subscription. If this +option is provided, messages are processed by the specified function.
+Optional
cleanupOptional
info: unknownOptional
dispatchedOptional
ingestionOptional
maxOptional maximum number of messages to deliver to the subscription before it is auto-unsubscribed.
-Optional
protocolOptional
queueOptional queue name (subscriptions on the same subject that use queues +
Optional
protocolOptional
queueOptional queue name (subscriptions on the same subject that use queues are horizontally load balanced when part of the same queue).
-Optional
timeoutOptional maximum number of milliseconds before a timer raises an error. This +
Optional
timeoutOptional maximum number of milliseconds before a timer raises an error. This useful to monitor a subscription that is expected to yield messages. The timer is cancelled when the first message is received by the subscription.
-Generated using TypeDoc
Generated using TypeDoc
The interface for creating instances of different JetStream materialized views.
-Optional
opts: Partial<ObjectStoreOptions>Generated using TypeDoc
The interface for creating instances of different JetStream materialized views.
+Gets or creates a JetStream KV store
+Optional
opts: Partial<ObjectStoreOptions>Optional
abort_If true, consume will abort if the stream or consumer is not found. Default is to recover +
Optional
abort_If true, consume will abort if the stream or consumer is not found. Default is to recover once the stream/consumer is restored. This option is exclusive of bind.
-Generated using TypeDoc
Generated using TypeDoc
Optional
bind?: booleanIf set to true the client will not try to check on its consumer by issuing consumer info +
Optional
bind?: booleanIf set to true the client will not try to check on its consumer by issuing consumer info requests. This means that the client may not report consumer not found, etc., and will simply fail request for messages due to missed heartbeats. This option is exclusive of abort_on_missing_resource.
This option is not valid on ordered consumers.
-Generated using TypeDoc
Generated using TypeDoc
Optional
callback?: ConsumerCallbackFnProcess messages using a callback instead of an iterator. Note that when using callbacks, +
Optional
callback?: ConsumerCallbackFnProcess messages using a callback instead of an iterator. Note that when using callbacks, the callback cannot be async. If you must use async functionality, process messages using an iterator.
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
DispatcherFn allows for values to be processed after being presented +
DispatcherFn allows for values to be processed after being presented to the iterator. Note that if the ProtocolFilter rejected the value it will not be presented to the DispatchedFn. Any processing should instead have been handled by the ProtocolFilterFn.
-Generated using TypeDoc
A service Endpoint
-Optional
handler?: ServiceHandlerAn optional handler - if not set the service is an iterator
- -Optional
metadata?: Record<string, string>Optional metadata about the endpoint
-Optional
queue?: stringOptional queue group to run this particular endpoint in. The service's configuration -queue configuration will be used. See ServiceConfig.
-Subject where the endpoint listens
-Generated using TypeDoc
A service Endpoint
+Optional
handler?: ServiceHandlerAn optional handler - if not set the service is an iterator
+Optional
metadata?: Record<string, string>Optional metadata about the endpoint
+Optional
queue?: stringOptional queue group to run this particular endpoint in. The service's configuration +queue configuration will be used. See ServiceConfig.
+Subject where the endpoint listens
+Optional
metadata?: Record<string, string>Optional
queue_Generated using TypeDoc
Optional
metadata?: Record<string, string>Optional
queue_Generated using TypeDoc
Statistics for an endpoint
-Generated using TypeDoc
Statistics for an endpoint
+Optional
endpoints?: NamedEndpointStats[]ISO Date string when the service started
+Optional
expires?: numberAmount of milliseconds to wait for messages before issuing another request. +
Optional
expires?: numberAmount of milliseconds to wait for messages before issuing another request. Note this value shouldn't be set by the user, as the default provides proper behavior. A low value will stress the server.
Minimum value is 1000 (1s).
- -30_000 (30s)
-Generated using TypeDoc
30_000 (30s)
+
+API prefix for the remote stream - the API prefix should be something like +
API prefix for the remote stream - the API prefix should be something like `$JS.domain.API where domain is the JetStream domain on the NATS server configuration.
-Optional
deliver?: stringDeliver prefix for the remote stream
-Generated using TypeDoc
Optional
deliver?: stringDeliver prefix for the remote stream
+Options for fetching bytes
-Generated using TypeDoc
Options for fetching bytes
+Options for fetching messages
-Generated using TypeDoc
Options for fetching messages
+Generated using TypeDoc
Optional
idle_Number of milliseconds to wait for a server heartbeat when not actively receiving +
Optional
idle_Number of milliseconds to wait for a server heartbeat when not actively receiving messages. When two or more heartbeats are missed in a row, the consumer will emit a notification. Note this value shouldn't be set by the user, as the default provides the proper behavior. A low value will stress the server.
-Generated using TypeDoc
IngestionFilterFn prevents a value from being ingested by the +
IngestionFilterFn prevents a value from being ingested by the
iterator. It is executed on push
. If ingest is false the value
shouldn't be pushed. If protcol is true, the value is a protcol
value
@param: data is the value @src: is the source of the data if set.
-Optional
src: unknownGenerated using TypeDoc
Optional
src: unknownGenerated using TypeDoc
The JetStream pull subscription object.
-Generated using TypeDoc
The JetStream pull subscription object.
+The JetStream Subscription object
-Generated using TypeDoc
The JetStream Subscription object
+Generated using TypeDoc
Generated using TypeDoc
Optional
headers_Notification should only include entry headers
-Optional
ignoreSkips notifying deletes. +
Optional
headers_Notification should only include entry headers
+Optional
ignoreSkips notifying deletes. @default: false
-Optional
include?: KvWatchIncludeSpecify what to include in the watcher, by default all last values.
-Optional
initializedA callback that notifies when the watch has yielded all the initial values. +
Optional
include?: KvWatchIncludeSpecify what to include in the watcher, by default all last values.
+Optional
initializedA callback that notifies when the watch has yielded all the initial values. Subsequent notifications are updates since the initial watch was established.
-Optional
key?: stringA key or wildcarded key following keys as if they were NATS subject names.
-Optional
resumeStarts watching at the specified revision. This is intended for watchers +
Optional
key?: string | string[]A key or wildcarded key following keys as if they were NATS subject names. +Note you can specify multiple keys if running on server 2.10.x or better.
+Optional
resumeStarts watching at the specified revision. This is intended for watchers that have restarted watching and have maintained some state of where they are in the watch.
-Generated using TypeDoc
Maximum number of bytes to retrieve - note request must fit the entire message +
Maximum number of bytes to retrieve - note request must fit the entire message to be honored (this includes, subject, headers, etc). Partial messages are not supported.
-Generated using TypeDoc
Maximum number of messages to retrieve.
- -100 messages
-Generated using TypeDoc
Maximum number of messages to retrieve.
+100 messages
+
+Converts a NATS message into some other type. Implementers are expected to: +
Converts a NATS message into some other type. Implementers are expected to: return [err, null] if the message callback is invoked with an error. return [err, null] if converting the message yielded an error, note that iterators will stop on the error, but callbacks will be presented with the error. return [null, T] if the conversion worked correctly
-Generated using TypeDoc
Generated using TypeDoc
Average processing_time is the total processing_time divided by the num_requests
-Optional
data?: unknownA field that can be customized with any data as returned by stats handler see ServiceConfig
-Optional
last_If set, the last error triggered by the endpoint
-The name of the endpoint
-Number of errors that the endpoint has raised
-The number of requests received by the endpoint
-Total processing_time for the service
-Optional
queue_The queue group the endpoint is listening on
-The subject the endpoint is listening on
-Generated using TypeDoc
Average processing_time, in nanoseconds, is the total processing_time divided by the num_requests
+Optional
data?: unknownA field that can be customized with any data as returned by stats handler see ServiceConfig
+Optional
last_If set, the last error triggered by the endpoint
+The name of the endpoint
+Number of errors that the endpoint has raised
+The number of requests received by the endpoint
+Total processing_time for the service in nanoseconds
+Optional
queue_The queue group the endpoint is listening on
+The subject the endpoint is listening on
+Value expressed as Nanoseconds - use the nanos(millis)
function
+
Value expressed as Nanoseconds - use the nanos(millis)
function
to convert millis to nanoseconds. Note that in some environments this
could overflow.
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
An object that allows reading the object stored under a specified name.
-The readable stream where you can read the data.
-A promise that will resolve to an error if the readable stream failed +
An object that allows reading the object stored under a specified name.
+The readable stream where you can read the data.
+A promise that will resolve to an error if the readable stream failed to process the entire response. Should be checked when the readable stream has finished yielding data.
-The info of the object that was retrieved.
-Generated using TypeDoc
The info of the object that was retrieved.
+name of object store storing the data
-Optional
name?: stringlink to single object, when empty this means the whole store
-Generated using TypeDoc
name of object store storing the data
+Optional
name?: stringlink to single object, when empty this means the whole store
+Optional
description?: stringOptional
headers?: MsgHdrsOptional
metadata?: Record<string, string>Optional
options?: ObjectStoreMetaOptionsGenerated using TypeDoc
Optional
description?: stringOptional
headers?: MsgHdrsOptional
metadata?: Record<string, string>Optional
options?: ObjectStoreMetaOptionsOptional
link?: ObjectStoreLinkIf set, the object is a reference to another entry.
-Optional
max_The maximum size in bytes for each chunk. +
Optional
link?: ObjectStoreLinkIf set, the object is a reference to another entry.
+Optional
max_The maximum size in bytes for each chunk. Note that if the size exceeds the maximum size of a stream entry, the number will be clamped to the streams maximum.
-Generated using TypeDoc
Optional
compression?: booleanSets the compression level of the stream. This feature is only supported in +
Optional
compression?: booleanSets the compression level of the stream. This feature is only supported in servers 2.10.x and better.
-Optional
description?: stringA description for the object store
-The maximum amount of data that the object store should store in bytes.
-Optional
metadata?: Record<string, string>Placement hints for the underlying object store stream
-The number of replicas to create.
-The underlying stream storage type for the object store.
-Optional
ttl?: NanosThe time to live for entries in the object store specified +
Optional
description?: stringA description for the object store
+The maximum amount of data that the object store should store in bytes.
+Optional
metadata?: Record<string, string>Placement hints for the underlying object store stream
+The number of replicas to create.
+The underlying stream storage type for the object store.
+Optional
ttl?: NanosThe time to live for entries in the object store specified
as nanoseconds. Use the nanos()
function to convert millis to
nanos.
Generated using TypeDoc
Optional
previousIf set the ObjectStore must be at the current sequence or the +
Optional
previousIf set the ObjectStore must be at the current sequence or the put will fail. Note the sequence accounts where the metadata for the entry is stored.
-Optional
timeout?: numbermaximum number of millis for the put requests to succeed
-Generated using TypeDoc
Optional
timeout?: numbermaximum number of millis for the put requests to succeed
+The underlying storage for the object store. Currently, this always +
The underlying storage for the object store. Currently, this always returns "JetStream".
-The bucket name
-Compression level of the stream. This feature is only supported in +
The bucket name
+Compression level of the stream. This feature is only supported in servers 2.10.x and better.
-the description associated with the object store.
-Optional
metadata?: Record<string, string>Metadata the object store. Note that +
the description associated with the object store.
+Optional
metadata?: Record<string, string>Metadata the object store. Note that
keys starting with _nats
are reserved. This feature only supported on servers
2.10.x and better.
The number of replicas associated with this object store.
-Set to true if the object store is sealed and will reject edits.
-The size in bytes that the object store occupies.
-The object store's underlying stream storage type.
-The StreamInfo backing up the ObjectStore
-The time to live for entries in the object store in nanoseconds. +
The number of replicas associated with this object store.
+Set to true if the object store is sealed and will reject edits.
+The size in bytes that the object store occupies.
+The object store's underlying stream storage type.
+The StreamInfo backing up the ObjectStore
+The time to live for entries in the object store in nanoseconds.
Convert to millis using the millis()
function.
Generated using TypeDoc
These options are a subset of ConsumerConfig and -ConsumerUpdateConfig
-Generated using TypeDoc
These options are a subset of ConsumerConfig and +ConsumerUpdateConfig
+Generated using TypeDoc
ProtocolFilterFn allows filtering of values that shouldn't be presented +
ProtocolFilterFn allows filtering of values that shouldn't be presented to the iterator. ProtocolFilterFn is executed when a value is about to be presented
- -boolean: true if the value should presented to the iterator
-Generated using TypeDoc
boolean: true if the value should presented to the iterator
+Optional
filter?: stringRestrict purging to messages that match this subject
-Purge all messages up to but not including the message with this sequence.
-Generated using TypeDoc
Optional
filter?: stringRestrict purging to messages that match this subject
+Purge all messages up to but not including the message with this sequence.
+Restrict purging to messages that match this subject
-Generated using TypeDoc
Restrict purging to messages that match this subject
+Generated using TypeDoc
Optional
filter?: stringRestrict purging to messages that match this subject
-Ensures this many messages are present after the purge.
-Generated using TypeDoc
Optional
filter?: stringRestrict purging to messages that match this subject
+Ensures this many messages are present after the purge.
+A reviver function
-Generated using TypeDoc
A reviver function
+Optional
description?: stringDescription for the service
-Optional
metadata?: Record<string, string>Optional metadata about the service
-A type for a service
-Optional
queue?: stringOptional queue group to run the service in. By default, +
Optional
description?: stringDescription for the service
+Optional
metadata?: Record<string, string>Optional metadata about the service
+A type for a service
+Optional
queue?: stringOptional queue group to run the service in. By default, then queue name is "q". Note that this configuration will be the default for all endpoints and groups.
-Optional
statsA customized handler for the stats of an endpoint. The +
Optional
statsA customized handler for the stats of an endpoint. The data returned by the endpoint will be serialized as is
-A version identifier for the service
-Generated using TypeDoc
A version identifier for the service
+Generated using TypeDoc
Generated using TypeDoc
The unique ID of the service reporting the stats
+The kind of the service reporting the stats
+A version for the service
+Generated using TypeDoc
Description for the service
+Information about the Endpoints
+Optional
metadata?: Record<string, string>Service metadata
+Optional
metadata?: Record<string, string>Generated using TypeDoc
Optional
metadata?: Record<string, string>The stats of a service
-Generated using TypeDoc
Options for StreamAPI info requests
-Generated using TypeDoc
Options for StreamAPI info requests
+Include info on deleted subjects.
+Only include information matching the specified subject filter
+Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Threshold bytes on which the client wil auto-trigger additional message requests +
Threshold bytes on which the client wil auto-trigger additional message requests
from the server. This is only applicable to consume
.
75% of MaxBytes.
-Generated using TypeDoc
75% of {@link MaxBytes}.
+
+Threshold message count on which the client will auto-trigger additional requests +
Threshold message count on which the client will auto-trigger additional requests
from the server. This is only applicable to consume
.
75% of MaxMessages.
-Generated using TypeDoc
75% of {@link MaxMessages}.
+
+Generated using TypeDoc
Const
Generated using TypeDoc
Const
Const
Generated using TypeDoc
Const
Const
Generated using TypeDoc
Const
Const
Generated using TypeDoc
Const
Const
Generated using TypeDoc
Const
Api
private
-