Delivered returns the number of delivered messages for this subscription.
()
| 5683 | |
| 5684 | // Delivered returns the number of delivered messages for this subscription. |
| 5685 | func (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 |
no outgoing calls