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 2021/12/03 19:29:47 UTC

[GitHub] [rocketmq] mrhbj opened a new pull request #3577: [Issue #3556]:Optimization: In the case of high concurrency,ThreadLoc…

mrhbj opened a new pull request #3577:
URL: https://github.com/apache/rocketmq/pull/3577


   DefaultMQProducerImpl .java
   code1:
   public class DefaultMQProducerImpl implements MQProducerInner { private final InternalLogger log = ClientLogger.getLog(); private final Random random = new Random();
   
   code2:
   private SendResult sendDefaultImpl(
   Message msg,
   final CommunicationMode communicationMode,
   final SendCallback sendCallback,
   final long timeout
   ) throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
   this.makeSureStateOK();
   Validators.checkMessage(msg, this.defaultMQProducer);
   final long invokeID = random.nextLong();


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] mrhbj closed pull request #3577: [Issue #3556]:Optimization: In the case of high concurrency,ThreadLocalRandom is better than Random

Posted by GitBox <gi...@apache.org>.
mrhbj closed pull request #3577:
URL: https://github.com/apache/rocketmq/pull/3577


   


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org