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 2019/10/31 03:27:05 UTC

[GitHub] [rocketmq] Jaskey opened a new issue #1561: Support specify max reconsume times in message level

Jaskey opened a new issue #1561: Support specify max reconsume times in message level
URL: https://github.com/apache/rocketmq/issues/1561
 
 
   **FEATURE REQUEST**
   
   In some case, user may need to decide different max reconsume times  for different kind of messages(for example, messages from topic A should be reconsume 10 times , messages from topicB should be reconsumed for at most 3 times, the rest messages will be use the default max reconsume times say 16) 
   
   In current implementations, consumer uses the same configuration of max reconsume times in cousumer level, though use set property  MAX_RECONSUME_TIMES, it has no effect. The related code is as below:
   
   ```
       public void sendMessageBack(MessageExt msg, int delayLevel, final String brokerName)
           throws RemotingException, MQBrokerException, InterruptedException, MQClientException {
           try {
               String brokerAddr = (null != brokerName) ? this.mQClientFactory.findBrokerAddressInPublish(brokerName)
                   : RemotingHelper.parseSocketAddressAddr(msg.getStoreHost());
               this.mQClientFactory.getMQClientAPIImpl().consumerSendMessageBack(brokerAddr, msg,
                   this.defaultMQPushConsumer.getConsumerGroup(), delayLevel, 5000, getMaxReconsumeTimes());// HERE! the max reconsumeTimes is always in consumer level
           } .......
   ```
   
   

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