leoxchang commented on issue #1864: the sync send method can not resent message 
when called timeout
URL: https://github.com/apache/rocketmq/issues/1864#issuecomment-600471154
 
 
   why this issue is closed? I want to know the producer sync send message to 
broker,and then happend timeout,the producer client should try again or not try 
?  or the application should hanlded itself.
   
    for (; times < timesTotal; times++) {
                   String lastBrokerName = null == mq ? null : 
mq.getBrokerName();
                   MessageQueue mqSelected = 
this.selectOneMessageQueue(topicPublishInfo, lastBrokerName);
                   if (mqSelected != null) {
                       mq = mqSelected;
                       brokersSent[times] = mq.getBrokerName();
                       try {
                           beginTimestampPrev = System.currentTimeMillis();
                           if (times > 0) {
                               //Reset topic with namespace during resend.
                               
msg.setTopic(this.defaultMQProducer.withNamespace(msg.getTopic()));
                           }
                           long costTime = beginTimestampPrev - 
beginTimestampFirst;
                           if (timeout < costTime) {
                               callTimeout = true;
                               break;
                           }
   
   when happend remotingtimeoutexception
   and second into for method,the costTime must big than timeout,so resent can 
not run

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


With regards,
Apache Git Services

Reply via email to