JetStream allows you to persist streams of messages; you can start reading from the stream at a specific point in time or start at a specific message sequence number.

The NATS Java library with support for JetStream has just been released!

JetStream allows you to persist streams of messages, allows consumers to either subscribe in real-time or to access the messages at a later time with the added flexibility to choose from wherein the stream you want to start receiving messages. You can start reading from the stream at a specific point in time or start at a specific message sequence number.

Since JetStream is built natively into the NATS Server, you get message persistence on top of all of the benefits of core NATS messaging. Stream messages are sent on subjects, just like normal NATS messages, so you can even just use a normal NATS subscription to get messages. Using the stream functionality, however, provides benefits above and beyond regular messaging.

There are various ways to create streams. You can use configuration, the command line program (CLI), or you can use the Java client’s JetStream Management API to manage streams. There are several stream functions you can execute with the management API:

  • Create a stream.
  • Modify a stream.
  • Delete a stream.
  • Purge messages from a stream.
  • Get information about a stream.
  • Manage the consumers of a stream.

This article will focus on creating a stream and the available options.

#java #tutorial #java (programming lang... #nats #stream collector #nats.io jetstream stream creation: java library

NATS.io JetStream Stream Creation: Java Library
1.90 GEEK