odbozhou commented on a change in pull request #3981:
URL: https://github.com/apache/rocketmq/pull/3981#discussion_r833950779



##########
File path: 
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:
       
线程池blockingqueue已经提供了很大的任务挤压数量,如果触发了线程池的拒绝策略,说明异步发送任务量已经非常大,客户端压力非常大了,快速失败也是对客户端的保护,不及时拒绝新的任务,任务一直挤压,可能导致更严重的问题(fullgc,发送慢等等)。




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to