You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/06/30 03:02:46 UTC

[GitHub] [rocketmq] henrypoter edited a comment on issue #2127: LitePullConsumer not work

henrypoter edited a comment on issue #2127:
URL: https://github.com/apache/rocketmq/issues/2127#issuecomment-651494809


   > @henrypoter would you like to provide more information(logs, env, etc.) about this issue?Did you turn off the automatic creation of topics and subscriptions? If yes, did you manually create it first?
   
   I have turn off the automatic creation of topics, and I created the topic manually.  I confirmed that the consumer group have been created automaticly. The subscription  state is ok.
   
   It may be the offset table is empty caused the issue. 
   
   ## env
   broker 4.6.0 dleger mode
   client 4.6.0,4.6.1,4.7.0 
   
   ## broker log when running the litePullConsumer 
   
   `
   ==> broker.log <==
   2020-06-30 10:49:44 INFO HeartbeatThread_3 - auto create a subscription group, SubscriptionGroupConfig [groupName=middleware-topic1-dr-group, consumeEnable=true, consumeFromMinEnable=true, consumeBroadcastEnable=true, retryQueueNums=1, retryMaxTimes=16, brokerId=0, whichBrokerWhenConsumeSlowly=1, notifyConsumerIdsChangedEnable=true]
   2020-06-30 10:49:44 INFO HeartbeatThread_3 - create new topic TopicConfig [topicName=%RETRY%middleware-topic1-dr-group, readQueueNums=1, writeQueueNums=1, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false]
   2020-06-30 10:49:44 INFO brokerOutApi_thread_3 - register broker[0]to name server 192.168.11.182:9876 OK
   2020-06-30 10:49:44 INFO brokerOutApi_thread_4 - register broker[0]to name server 192.168.11.181:9876 OK
   2020-06-30 10:49:44 INFO brokerOutApi_thread_2 - register broker[0]to name server 192.168.11.180:9876 OK
   2020-06-30 10:49:44 INFO HeartbeatThread_3 - new consumer connected, group: middleware-topic1-dr-group CONSUME_ACTIVELY CLUSTERING channel: ClientChannelInfo [channel=[id: 0x6f069b95, L:/192.168.11.181:30911 - R:/192.168.11.123:58139], clientId=10.88.0.50@23332, language=JAVA, version=335, lastUpdateTimestamp=1593485384567]
   2020-06-30 10:49:44 INFO HeartbeatThread_3 - subscription changed, add new topic, group: middleware-topic1-dr-group SubscriptionData [classFilterMode=false, topic=middleware-topic, subString=*, tagsSet=[], codeSet=[], subVersion=1593485358956, expressionType=TAG]
   2020-06-30 10:49:44 INFO HeartbeatThread_3 - registerConsumer info changed ConsumerData [groupName=middleware-topic1-dr-group, consumeType=CONSUME_ACTIVELY, messageModel=CLUSTERING, consumeFromWhere=CONSUME_FROM_LAST_OFFSET, unitMode=false, subscriptionDataSet=[SubscriptionData [classFilterMode=false, topic=middleware-topic, subString=*, tagsSet=[], codeSet=[], subVersion=1593485358956, expressionType=TAG]]] 192.168.11.123:58139`
   
   ## The litePullConsumer can not poll any messages, there are some messages in the topic:
   
   `List<MessageExt> messageExts = litePullConsumer.poll(30000);`
                       
   ##The litePullConsumer offset table is empty:
   ` OffsetStore offsetStore = litePullConsumer.getOffsetStore();
   Map<MessageQueue, Long>  queueOffsetMap =  offsetStore.cloneOffsetTable(topic);`
   
   ##  if I use the push consumer with the same consumer group name to subscribe the topic, it consumes normally.
   Then I kill the push consumer, run the litePullConsumer again, it works.


----------------------------------------------------------------
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:
users@infra.apache.org