Skip to content

why jetstream subscribe routine always receive all message history ? #1299

Closed Answered by scottf
icoco asked this question in Q&A
Discussion options

You must be logged in to vote

Where is the code for getStream(subject) As far as I know this returns a JetStreamContext. When you subscribe this way you are making a brand new consumer to the stream. As you've configured the subscription, your consumer starts at the first message of the stream.

Please have a look at the top of the readme https://github.com/nats-io/nats.java?tab=readme-ov-file#examples-and-other-documentation there are links to many examples.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@icoco
Comment options

Answer selected by icoco
Comment options

You must be logged in to vote
1 reply
@scottf
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants