HUHANK commented on issue #465:
URL: 
https://github.com/apache/rocketmq-client-cpp/issues/465#issuecomment-2019677079

   > 掉用`registerMessageListener`函数的代码
   
   ```
   try
       {
           m_consumer_handler = new 
DefaultMQPushConsumer(m_consumer_group_name);
           m_consumer_handler->setNamesrvAddr(m_namesrv_addr);
           m_consumer_handler->setGroupName(m_consumer_group_name);
           m_consumer_handler->setConsumeFromWhere(CONSUME_FROM_LAST_OFFSET);
           m_consumer_handler->subscribe(m_consumer_topic, "*");
           m_consumer_handler->setConsumeThreadCount(1);
           m_consumer_handler->setConsumeMessageBatchMaxSize(31);
           m_consumer_handler->setAsyncPull(true);
           m_consumer_msg_listener = new ConsumerMsgListener(this);
           m_consumer_handler->registerMessageListener(m_consumer_msg_listener);
           m_consumer_handler->start();
       }
       catch (const MQClientException &e)
       {
           LOG_ERROR(e.what());
           return false;
       }
   ```


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to