code: func (r *messageRing) Drain() []*Message {
  	r.mu.Lock()
  	ls := make([]*Message, 0, len(r.queue))
  	ls = append(ls, r.queue...)
  	r.sizeBytes = 0
  	r.queue = r.queue[:0]
  	r.mu.Unlock()
  	return ls
  }
docs: // Drain drains all messages from the queue.
  // This can be used after `Close()` to get any remaining messages that were in queue.