raftonsea commented on issue #1918: About consumers stopping pulling messages
URL: https://github.com/apache/rocketmq/issues/1918#issuecomment-612447520
 
 
   I also meet the same problem.  My consumer seems like not stopped  , but it 
refuse consme data . In my scenario ,  I have a topic ( vacc_top )  with   48 
messageQueues  among 3 brokers , I found that it stopped consume in mq4  which  
reside in  broker-a . But the consumer has not stopped , I send a message to 
the topic by mq-console , it works normal . It just  delays some messages  .  
When I restart my application or start a new consumer   the delay disappear  
and everything is fine .   
   
   In my opinion , it seems like the MQ-PullRequest exit by some reason so the 
mq cannot be consumed .  I debugged the consumer code , I found the code below 
in   DefaultMQPushConsumerImpl 
   
   ` if (processQueue.isDropped()) {
               log.info("the pull request[{}] is dropped.", 
pullRequest.toString());
               return;
           }`
     
   `  if (pullResult.getNextBeginOffset() < prevRequestOffset
                                   || firstMsgOffset < prevRequestOffset) {
                                   log.warn(
                                       "[BUG] pull message result maybe data 
wrong, nextBeginOffset: {} firstMsgOffset: {} prevRequestOffset: {}",
                                       pullResult.getNextBeginOffset(),
                                       firstMsgOffset,
                                       prevRequestOffset);
                               }`
   
   
   
   It seems that : 
   1 , the processQueue is stopped (  perhaps because of expired , when 
doRebalance  rocketmq will evaluate the last pull timestamp of the processqueue 
 to decide  weather to expir the processqueue )  so the mq stop consume . 
   2 , the pullRequest get wrong offset from broker ( the next pull offset from 
the pullResult  is   less than the  previous pull offset)  , so the  
pullRequest exit .  
   
   As everything become ok after I restart my consumer , so I prefer the first 
reason . 
   I will inspect my log carefully and hope  my case will be helpful . 
   Thanks . 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to