MCPcopy
hub / github.com/nats-io/nats.go / trackSequences

Method trackSequences

js.go:2143–2147  ·  view source on GitHub ↗

Keeps track of the incoming message's reply subject so that the consumer's state (deliver sequence, etc..) can be checked against heartbeats. We will also bump the incoming data message sequence that is used in FC cases. Runs under the subscription lock

(reply string)

Source from the content-addressed store, hash-verified

2141// We will also bump the incoming data message sequence that is used in FC cases.
2142// Runs under the subscription lock
2143func (sub *Subscription) trackSequences(reply string) {
2144 // For flow control, keep track of incoming message sequence.
2145 sub.jsi.fciseq++
2146 sub.jsi.cmeta = reply
2147}
2148
2149// Check to make sure messages are arriving in order.
2150// Returns true if the sub had to be replaced. Will cause upper layers to return.

Callers 1

processMsgMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected