tomsun28 commented on code in PR #3481:
URL: https://github.com/apache/hertzbeat/pull/3481#discussion_r2159785575


##########
hertzbeat-manager/src/main/java/org/apache/hertzbeat/manager/config/RestTemplateConfig.java:
##########
@@ -58,4 +60,16 @@ public ClientHttpRequestFactory 
simpleClientHttpRequestFactory() {
         );
     }
 
+    @Bean("restTemplateThreadPool")
+    public Executor restTemplateThreadPool() {
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        executor.setCorePoolSize(10);
+        executor.setMaxPoolSize(50);
+        executor.setQueueCapacity(200);

Review Comment:
   hi the http request require timeliness, suggest use the `SynchronousQueue` 
instead of  `        executor.setQueueCapacity(200);` , and ` 
executor.setCorePoolSize(2); executor.setMaxPoolSize(Integer.MAX_VALUE);` 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to