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
The time the message was received
The time the message was received as an ISO formatted date string
Represents the message timestamp in nanoseconds as a BigInt.
Indicate to the JetStream server that the message was processed successfully.
Indicate to the JetStream server that the message was processed successfully and that the JetStream server should acknowledge back that the acknowledgement was received.
Optional
opts: Partial<{ timeout: number }>are optional options (currently only a timeout value if not specified uses the timeout specified in the JetStreamOptions when creating the JetStream context.
Convenience method to parse the message payload as JSON. This method will throw an exception if there's a parsing error;
Indicate to the JetStream server that processing of the message failed, and that it should be resent after the specified number of milliseconds.
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 how long to keep the request open can be specified, this functionality doesn't work well with iterators, as an error (408s) are expected and needed to re-trigger a pull in case there was a timeout. In an iterator, the error will close the iterator, requiring a subscription to be reset.
Optional
ro: Partial<PullOptions>Convenience method to parse the message payload as string. This method may throw an exception if there's a conversion error
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
that reason
is only available on servers 2.11.0 or better.
Indicate to the JetStream server that processing of the message is on going, and that the ack wait timer for the message should be reset preventing a redelivery.
Represents a message stored in JetStream