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

Method Delivered

nats.go:5685–5695  ·  view source on GitHub ↗

Delivered returns the number of delivered messages for this subscription.

()

Source from the content-addressed store, hash-verified

5683
5684// Delivered returns the number of delivered messages for this subscription.
5685func (s *Subscription) Delivered() (int64, error) {
5686 if s == nil {
5687 return -1, ErrBadSubscription
5688 }
5689 s.mu.Lock()
5690 defer s.mu.Unlock()
5691 if s.conn == nil || s.closed {
5692 return -1, ErrBadSubscription
5693 }
5694 return int64(s.delivered), nil
5695}
5696
5697// Dropped returns the number of known dropped messages for this subscription.
5698// This will correspond to messages dropped by violations of PendingLimits. If

Callers 4

TestNilConnectionFunction · 0.95
TestJetStream_DrainFunction · 0.80

Calls

no outgoing calls

Tested by 4

TestNilConnectionFunction · 0.76
TestJetStream_DrainFunction · 0.64