lwclover opened a new issue #2442:
URL: https://github.com/apache/rocketmq/issues/2442


   **BUG REPORT**
   
   1. Please describe the issue you observed:
   - What did you do (The steps to reproduce)?
   In production enc, Because of disk IO trggers broker flow control
   
   - What did you expect to see?
   I think when a broker is busy, producer can retry send message to another 
broker
   
   - What did you see instead?
   `org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2  DESC: 
[TIMEOUT_CLEAN_QUEUE]broker busy, start flow control for a while, period in 
queue: 204ms, size of queue: 0
   For more information, please visit the url, 
http://rocketmq.apache.org/docs/faq/
   .....`
   
   2. Please tell us about your environment:
   RocketMQ 4.5.2
   Centos 6
   
   3. Other information:
   I fix it:
   class:   org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl
   method: sendDefaultImpl
   code snippet:
   between “” and “” is my code
   catch (MQBrokerException e) {
                           endTimestamp = System.currentTimeMillis();
                           this.updateFaultItem(mq.getBrokerName(), 
endTimestamp - beginTimestampPrev, true);
                           log.warn(String.format("sendKernelImpl exception, 
resend at once, InvokeID: %s, RT: %sms, Broker: %s", invokeID, endTimestamp - 
beginTimestampPrev, mq), e);
                           log.warn(msg.toString());
                           exception = e;
                           switch (e.getResponseCode()) {
                               case ResponseCode.TOPIC_NOT_EXIST:
                               case ResponseCode.SERVICE_NOT_AVAILABLE:
                               case ResponseCode.SYSTEM_ERROR:
                               case ResponseCode.NO_PERMISSION:
                               case ResponseCode.NO_BUYER_ID:
                               case ResponseCode.NOT_IN_CURRENT_UNIT:
                               **case ResponseCode.SYSTEM_BUSY: //Retry is 
required when the flow is triggered**
                                   continue;
                               default:
                                   if (sendResult != null) {
                                       return sendResult;
                                   }
   
                                   throw e;
                           }
                       }


----------------------------------------------------------------
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:
[email protected]


Reply via email to