code: async function _processChangeFeed(getFeed, onFeedItem, onError, options, attempts) {
    const logger = _getLogger(options)
    try {
      const cursor = await getFeed()
      logger.info('Successfully obtained connection to changefeed.')
      cursor.each((err, result) => {
        if (err) {
          if (_isConnectionError(err)) {
            // if we get here, we've connected successfully _at least_ once, so we
            // reset our number of `attempts` to 0
            return _processChangeFeedWithAutoReconnect(getFeed, onFeedItem, onError, options, 0, err)
          }
          logger.error(err.stack)
          return onError(err)
        }
        onFeedItem(result)
      })
    } catch (err) {
      if (_isConnectionError(err)) {
        return _processChangeFeedWithAutoReconnect(getFeed, onFeedItem, onError, options, attempts + 1, err)
      }
      logger.error(err.stack)
      return onError(err)
    }
  }
docs: /* eslint-disable max-params