Optional
infoInitiates 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 JetStream or consuming messages from streams.
Optional
opts: JetStreamOptionsReturns a Promise to a JetStreamManager which allows the client to access Streams and Consumers information.
Optional
opts: JetStreamOptionsPublishes the specified data to the specified subject.
Optional
data: Uint8ArrayOptional
options: PublishOptionsPublishes a request with specified data in the specified subject expecting a response before 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
data: Uint8ArrayOptional
opts: RequestOptionsPublishes a request expecting multiple responses back. Several strategies to determine when the request should stop gathering responses.
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
ServerInfo to the currently connected server or undefined