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/03/03 07:49:50 UTC

[GitHub] [rocketmq-client-cpp] BrentHuang commented on issue #270: How to connect aliyun MQ?

BrentHuang commented on issue #270: How to connect aliyun MQ?
URL: https://github.com/apache/rocketmq-client-cpp/issues/270#issuecomment-593814289
 
 
   class RocketMQMsgListener : public rocketmq::MessageListenerConcurrently
   {
   public:
       RocketMQMsgListener() {}
       virtual ~RocketMQMsgListener() {}
   
       virtual rocketmq::ConsumeStatus consumeMessage(const std::vector<rocketmq::MQMessageExt>& msgs)
       {
           for (size_t i = 0; i < msgs.size(); ++i)
           {
               callback_(msgs[i].getTopic(), msgs[i].getTags(), msgs[i].getMsgId(), msgs[i].getBody());
           }
   
           return rocketmq::CONSUME_SUCCESS;
       }
   
   请问,这个回调接口的参数是一个msg的vector,在其中我循环消费每一个消息,然后总体返回一个CONSUME_SUCCESS。那么如果有的消息消费失败了,有的消费成功了,怎么办呢?总体返回一个CONSUME_SUCCESS不行吧?对于每一个消息的具体消费情况,怎么给服务器答复呢?
   

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


With regards,
Apache Git Services