handleConsumerSequenceMismatch will send an async error that can be used to restart a push based consumer.
(sub *Subscription, err error)
| 2394 | |
| 2395 | // handleConsumerSequenceMismatch will send an async error that can be used to restart a push based consumer. |
| 2396 | func (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. |
| 2406 | func (nc *Conn) checkForSequenceMismatch(msg *Msg, s *Subscription, jsi *jsSub) { |
no test coverage detected