nowinkeyy commented on code in PR #5887:
URL: https://github.com/apache/rocketmq/pull/5887#discussion_r1096546335
##########
store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:
##########
@@ -2743,6 +2850,258 @@ public String getServiceName() {
}
+ class MainBatchDispatchRequestService extends ServiceThread {
+
+ private final ExecutorService batchDispatchRequestExecutor;
+
+ public MainBatchDispatchRequestService() {
+ batchDispatchRequestExecutor = new ThreadPoolExecutor(
+
DefaultMessageStore.this.getBrokerConfig().getBatchDispatchRequestThreadPoolNums(),
+
DefaultMessageStore.this.getBrokerConfig().getBatchDispatchRequestThreadPoolNums(),
+ 1000 * 60,
+ TimeUnit.MICROSECONDS,
+ new LinkedBlockingQueue<>(1024),
Review Comment:
> @nowinkeyy , sorry.
>
> I thought for a moment,it must be se right
RejectedExecutionHandler,because if it occur,may can lost message. the reject
policy can block task,but cant't throw Exception cause message lost
You are right. And i have an idea that I don't know if it is feasible.
Before putting a task on a thread pool queue, determine if the queue size is
less than 1024? As shown in the figure:

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