ReadonlycountThe current number of messages currently added to the batch
ReadonlyidThe unique identifier for the batch, generated by the client when the batch is created.
Appends the next message to the batch.
Optionalpayload: PayloadOptionalopts: Partial<BatchMessageOptions>Appends the next message to the batch, but will wait for the server to acknowledge the message.
Optionalpayload: PayloadOptionalopts: Partial<BatchMessageOptionsWithReply>Commits the batch. This will publish the last message on the batch and will remove the batch from the client.
Optionalpayload: PayloadOptionalopts: Partial<RequestOptions>
A Batch represents a number of messages staged into a stream atomically. The batch has several limits imposed by the server, such as a batch may not contain more than 1000 messages (including the message starting and ending the batch. And no more than 50 batches on a stream can be active. Batches that are inactive for more than 10 seconds, are abandoned by the server.
For more information check the JetStream documentation.