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/09/25 03:49:39 UTC

[GitHub] [rocketmq] liony opened a new issue #1482: fix communicationMode

liony opened a new issue #1482: fix communicationMode
URL: https://github.com/apache/rocketmq/issues/1482
 
 
   cause sync as try once , and async can try once more, but this line code is not that meaning, and from the invoke context alse can explain there has some logic wrong.
   
   ![sync_invoke](https://user-images.githubusercontent.com/8624468/65567791-0db5a600-df8a-11e9-9d88-c1a7b3505440.jpg)
   ![async_invoke](https://user-images.githubusercontent.com/8624468/65567797-1312f080-df8a-11e9-81d8-5b74080196f9.jpg)
   
   so change the code:
   
   int timesTotal = communicationMode == CommunicationMode.**SYNC** ? 1 + this.defaultMQProducer.getRetryTimesWhenSendFailed() : 1;
   
   fix as:
   
   int timesTotal = communicationMode == CommunicationMode.**ASYNC** ? 1 + this.defaultMQProducer.getRetryTimesWhenSendFailed() : 1;
   
   here is the fixed file: [DefaultMQProducerImpl.java](https://github.com/apache/rocketmq/files/3650452/DefaultMQProducerImpl.txt)

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