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 2022/04/08 10:47:36 UTC

[GitHub] [rocketmq] lwclover commented on a diff in pull request #3981: [ISSUE #3982]Async send mode, the default send executor add abort policy

lwclover commented on code in PR #3981:
URL: https://github.com/apache/rocketmq/pull/3981#discussion_r845987757


##########
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:
##########
@@ -135,7 +135,8 @@ public DefaultMQProducerImpl(final DefaultMQProducer defaultMQProducer, RPCHook
                 public Thread newThread(Runnable r) {
                     return new Thread(r, "AsyncSenderExecutor_" + this.threadIndex.incrementAndGet());
                 }
-            });
+            },
+            new ThreadPoolExecutor.CallerRunsPolicy());

Review Comment:
   > 我觉得你说的这种场景,可能增加一个producer从而增加线程数,提升发送处理速度,可能更有利于解决这个问题。
   
   使用异步发送方式,其实是对消息可靠性要求不高的场景。但是我还是认为要尽可能发送成功的,避免出现阻塞队列满丢弃消息的现象



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