Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding the jetstream stream first_seq value #190

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

rayjanoka
Copy link
Contributor

@rayjanoka rayjanoka commented Sep 29, 2022

Hey!

I was in need of the first_seq value to understand how far behind in the sequence the oldest message in the stream is. This is when using WorkQueuePolicy or InterestPolicy to delete messages from the stream as they are consumed. I think this metric is usually called data freshness. The nats server already had this value available to grab so it was pretty simple.

nats_stream_first_seq{account="$G",cluster="nats",domain="",is_meta_leader="true",is_stream_leader="true",meta_leader="nats-4",server_id="xxxx",server_name="nats-4",stream_leader="nats-4",stream_name="stream"} 952350

thx! 🚀

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wallyqs wallyqs merged commit 5527020 into nats-io:main Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants