mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 10:10:42 -07:00
Merge branch 'main' into dev
This commit is contained in:
@@ -6631,6 +6631,14 @@ func (mset *stream) processClusteredInboundMsg(subject, reply string, hdr, msg [
|
||||
if err != nil && mset.clseq > 0 {
|
||||
mset.clseq--
|
||||
}
|
||||
|
||||
// Check to see if we are being overrun.
|
||||
// TODO(dlc) - Make this a limit where we drop messages to protect ourselves, but allow to be configured.
|
||||
const warnThreshold = 10_000
|
||||
if mset.clseq-lseq > warnThreshold {
|
||||
lerr := fmt.Errorf("JetStream stream '%s > %s' has high message lag", jsa.acc().Name, mset.cfg.Name)
|
||||
s.RateLimitWarnf(lerr.Error())
|
||||
}
|
||||
mset.clMu.Unlock()
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user