odbozhou commented on a change in pull request #3981:
URL: https://github.com/apache/rocketmq/pull/3981#discussion_r833855946
##########
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:
In my opinion, if it is to limit the flow and reject redundant tasks,
the default AbortPolicy should be enough, and CallerRunsPolicy will run the
task, in which case the task is discarded.
--
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]