code: function _processChangeFeedWithAutoReconnect(getFeed, onFeedItem, onError, options) {
    var attempts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
    var err = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
    var maxAttempts = options.maxAttempts,
        attemptDelay = options.attemptDelay;
  
    var logger = _getLogger(options);
  
    if (attempts >= maxAttempts) {
      logger.error('Attempted ' + attempts + ' times to obtain connection to changefeed without success. Giving up.', err.stack);
      return onError(err);
    } else if (attempts > 0) {
      logger.warn('Attempted ' + attempts + ' times to obtain connection to changefeed, but haven\'t yet succeeded; trying again.');
    }
    setTimeout(function () {
      _processChangeFeed(getFeed, onFeedItem, onError, options, attempts);
    }, attempts * attemptDelay); // linear back-off (0s, 10s, 20s, 30s, 40s ...)
  }
docs: /* eslint-disable max-params