Package com.alibaba.rocketmq.client.consumer

Examples of com.alibaba.rocketmq.client.consumer.PullResult


            mq.setBrokerName(brokerName);
            mq.setQueueId(Integer.parseInt(queueId));

            defaultMQPullConsumer.start();

            PullResult pullResult = defaultMQPullConsumer.pull(mq, "*", Long.parseLong(offset), 1);
            if (pullResult != null) {
                switch (pullResult.getPullStatus()) {
                case FOUND:
                    QueryMsgByIdSubCommand.queryById(defaultMQAdminExt, pullResult.getMsgFoundList().get(0)
                        .getMsgId());
                    break;
                case NO_MATCHED_MSG:
                case NO_NEW_MSG:
                case OFFSET_ILLEGAL:
View Full Code Here


      int fetchSize = 0;
      int oneFetchSize = Math.min(oneQueueFetchSize, 32);
     
      while(fetchSize < oneQueueFetchSize) {
       
        PullResult pullResult = null;
              try {
                  pullResult = consumer.pullBlockIfNotFound(mq, subexpress, offset, oneFetchSize);
                  offset = pullResult.getNextBeginOffset();
                  PullStatus status = pullResult.getPullStatus();
                  if  (status == PullStatus.FOUND) {
                    List<MessageExt> msgList = pullResult.getMsgFoundList();
                      ret.addAll(msgList);
                      fetchSize += msgList.size();
                      continue;
                  }else if (status ==  PullStatus.NO_MATCHED_MSG) {
                      continue;
View Full Code Here

TOP

Related Classes of com.alibaba.rocketmq.client.consumer.PullResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.