Skip to content

Jetstream Sequence Number and/or Last Sequence Number in Subject #4147

Closed Answered by derekcollison
FerdinandvHagen asked this question in Q&A
Discussion options

You must be logged in to vote

You want to use the messages metadata which has everything you want.

  meta, err := msg.Metadata()

The struct from the Go client.

// MsgMetadata is the JetStream metadata associated with received messages.
type MsgMetadata struct {
	Sequence     SequencePair
	NumDelivered uint64
	NumPending   uint64
	Timestamp    time.Time
	Stream       string
	Consumer     string
	Domain       string
}

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@FerdinandvHagen
Comment options

@alifengineer
Comment options

@derekcollison
Comment options

@Jarema
Comment options

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