code: func findBestQueueSub(sl []*subState) *subState {
  	var (
  		leastOutstanding = int(^uint(0) >> 1)
  		rsub             *subState
  	)
  	for _, sub := range sl {
  
  		sub.RLock()
  		sOut := len(sub.acksPending)
  		sStalled := sub.stalled
  		sHasFailedHB := sub.hasFailedHB
  		sub.RUnlock()
  
  		// Favor non stalled subscribers and clients that do not have failed heartbeats
  		if !sStalled && !sHasFailedHB {
  			if sOut < leastOutstanding {
  				leastOutstanding = sOut
  				rsub = sub
  			}
  		}
  	}
  
  	len := len(sl)
  	if rsub == nil && len > 0 {
  		rsub = sl[0]
  	}
  	if len > 1 && rsub == sl[0] {
  		copy(sl, sl[1:len])
  		sl[len-1] = rsub
  	}
  
  	return rsub
  }
docs: // FIXME(dlc) - place holder to pick sub that has least outstanding, should just sort,
  // or use insertion sort, etc.