You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2023/01/12 10:35:52 UTC

[GitHub] [rocketmq] Oliverwqcwrw commented on a diff in pull request #5870: [ISSUE #5859]Optimize String#format in DefaultMQProducerImpl

Oliverwqcwrw commented on code in PR #5870:
URL: https://github.com/apache/rocketmq/pull/5870#discussion_r1067959835


##########
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:
##########
@@ -695,16 +695,13 @@ private SendResult sendDefaultImpl(
             if (sendResult != null) {
                 return sendResult;
             }
+            StringBuilder info = new StringBuilder(300);
+            info.append("Send [").append(times).append("] times, still failed, cost [")
+                .append(System.currentTimeMillis() - beginTimestampFirst).append("]ms, Topic: ").append(msg.getTopic())
+                .append(", BrokersSent: ").append(Arrays.toString(brokersSent))
+                .append(FAQUrl.suggestTodo(FAQUrl.SEND_MSG_FAILED));

Review Comment:
   IMO, these transitions are all in the exception scene,
   
   it will lost a little performance when in the little scene,
   
   so  we can choose the readability when in this scene.



-- 
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: commits-unsubscribe@rocketmq.apache.org

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