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

Method decrementPendingMsgs

jetstream/pull.go:438–443  ·  view source on GitHub ↗

decrementPendingMsgs decrements pending message count and byte count lock should be held before calling this method

(msg *nats.Msg)

Source from the content-addressed store, hash-verified

436// decrementPendingMsgs decrements pending message count and byte count
437// lock should be held before calling this method
438func (s *pullSubscription) decrementPendingMsgs(msg *nats.Msg) {
439 s.pending.msgCount--
440 if s.consumeOpts.MaxBytes != 0 && !s.consumeOpts.LimitSize {
441 s.pending.byteCount -= msg.Size()
442 }
443}
444
445// incrementDeliveredMsgs increments delivered message count
446// lock should be held before calling this method

Callers 2

ConsumeMethod · 0.95
NextMethod · 0.95

Calls 1

SizeMethod · 0.65

Tested by

no test coverage detected