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

Method handleConsumerSequenceMismatch

js.go:2396–2403  ·  view source on GitHub ↗

handleConsumerSequenceMismatch will send an async error that can be used to restart a push based consumer.

(sub *Subscription, err error)

Source from the content-addressed store, hash-verified

2394
2395// handleConsumerSequenceMismatch will send an async error that can be used to restart a push based consumer.
2396func (nc *Conn) handleConsumerSequenceMismatch(sub *Subscription, err error) {
2397 nc.mu.Lock()
2398 errCB := nc.Opts.AsyncErrorCB
2399 if errCB != nil {
2400 nc.ach.push(func() { errCB(nc, sub, err) })
2401 }
2402 nc.mu.Unlock()
2403}
2404
2405// checkForSequenceMismatch will make sure we have not missed any messages since last seen.
2406func (nc *Conn) checkForSequenceMismatch(msg *Msg, s *Subscription, jsi *jsSub) {

Callers 2

resetOrderedConsumerMethod · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected