private boolean processWhenRetryTooMany(final FetchRequest request, final MessageIterator it) {
      if (SimpleFetchManager.this.isRetryTooMany(request)) {
        try {
          final Message couldNotProecssMsg = it.next();
          MessageAccessor.setPartition(couldNotProecssMsg, request.getPartitionObject());
          MetaStatLog.addStat(null, StatConstants.SKIP_MSG_COUNT, couldNotProecssMsg.getTopic());
          SimpleFetchManager.this.consumer.appendCouldNotProcessMessage(couldNotProecssMsg);
        } catch (final InvalidMessageException e) {
          MetaStatLog.addStat(null, StatConstants.INVALID_MSG_STAT, request.getTopic());
          // 消息体非法,获取有效offset,重新发起查询
          this.getOffsetAddRequest(request, e);
          return true;
        } catch (final Throwable t) {
          this.LogAddRequest(request, t);
          return true;
        }

        request.resetRetries();
        // 跳过这条不能处理的消息
        request.setOffset(request.getOffset() + it.getOffset(), it.getPrevMessage().getId(), true);
        // 强制设置延迟为0
        request.setDelay(0);
        SimpleFetchManager.this.addFetchRequest(request);
        return true;
      } else {
        return false;
      }
    }
 /**
  * 返回是否需要跳过后续的处理
  *
  * @param request
  * @param it
  * @param listener
  * @param partition
  * @return
  */
 private boolean processReceiveMessage(
     final FetchRequest request,
     final MessageIterator it,
     final MessageListener listener,
     final Partition partition) {
   int count = 0;
   while (it.hasNext()) {
     final int prevOffset = it.getOffset();
     try {
       final Message msg = it.next();
       MessageAccessor.setPartition(msg, partition);
       if (((SimpleMessageConsumer) consumer).canConsumer(msg)) listener.recieveMessages(msg);
       if (partition.isAutoAck()) {
         count++;
       } else {
         // 提交或者回滚都必须跳出循环
         if (partition.isAcked()) {
           count++;
           break;
         } else if (partition.isRollback()) {
           break;
         } else {
           // 不是提交也不是回滚,仅递增计数
           count++;
         }
       }
     } catch (final InvalidMessageException e) {
       MetaStatLog.addStat(null, StatConstants.INVALID_MSG_STAT, request.getTopic());
       // 消息体非法,获取有效offset,重新发起查询
       this.getOffsetAddRequest(request, e);
       return true;
     } catch (final Throwable e) {
       // 将指针移到上一条消息
       it.setOffset(prevOffset);
       log.error(
           "MessageListener处理消息异常,topic="
               + request.getTopic()
               + ",partition="
               + request.getPartition(),
           e);
       // 跳出循环,处理消息异常,到此为止
       break;
     }
   }
   MetaStatLog.addStatValue2(null, StatConstants.GET_MSG_COUNT_STAT, request.getTopic(), count);
   return false;
 }