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/09/28 01:54:05 UTC

[GitHub] [rocketmq-spring] sunjianlin12345 opened a new issue #298: log.warn("consume message failed. messageExt:{}", messageExt, e)打印了大量日志

sunjianlin12345 opened a new issue #298:
URL: https://github.com/apache/rocketmq-spring/issues/298


   当网络或其它异常情况时,mq重试16次,且当MessageExt中的body消息信息内容较大时,下述2个位置的代码打印了大量的日志:
   
   org.apache.rocketmq.spring.support.DefaultRocketMQListenerContainer.DefaultMessageListenerConcurrently#consumeMessage
   
   org.apache.rocketmq.spring.support.DefaultRocketMQListenerContainer.DefaultMessageListenerOrderly#consumeMessage
   
   这段代码打印了大量日志,导致日志文件特别大,希望这个能优化下:
   log.warn("consume message failed. messageExt:{}", messageExt, e);
   
   `try {
                       long now = System.currentTimeMillis();
                       rocketMQListener.onMessage(doConvertMessage(messageExt));
                       long costTime = System.currentTimeMillis() - now;
                       log.info("consume {} cost: {} ms", messageExt.getMsgId(), costTime);
                   } catch (Exception e) {
                       log.warn("consume message failed. messageExt:{}", messageExt, e);
                       context.setSuspendCurrentQueueTimeMillis(suspendCurrentQueueTimeMillis);
                       return ConsumeOrderlyStatus.SUSPEND_CURRENT_QUEUE_A_MOMENT;
                   }`


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



[GitHub] [rocketmq-spring] RongtongJin closed issue #298: Too many warning info when consuming failed.

Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #298:
URL: https://github.com/apache/rocketmq-spring/issues/298


   


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



[GitHub] [rocketmq-spring] RongtongJin commented on issue #298: Too many warning info when consuming failed.

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #298:
URL: https://github.com/apache/rocketmq-spring/issues/298#issuecomment-699900818


   I think this log is necessary to help track consume failed messages. The problem is mainly caused by the large message body. So could you submit a PR to print the important information of messages but not print the body? I am willing to follow the pr.


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