You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/12/01 13:06:17 UTC

[GitHub] [incubator-eventmesh] horoc commented on a diff in pull request #2324: [ISSUE #1111] Variable for Client Pool

horoc commented on code in PR #2324:
URL: https://github.com/apache/incubator-eventmesh/pull/2324#discussion_r1037084996


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshGrpcServer.java:
##########
@@ -262,7 +266,8 @@ private void initThreadPool() {
 
     private void initHttpClientPool() {
         httpClientPool = new LinkedList<>();
-        for (int i = 0; i < 8; i++) {
+        int clientPool = (int)(Math.random() * (MAX_LIMIT - MIN_LIMIT + 1) + MIN_LIMIT);

Review Comment:
   <img width="1370" alt="image" src="https://user-images.githubusercontent.com/63457588/205059786-a0603863-b65d-4f8c-8526-5130d747ad97.png">
   
   Still has checkStyle error in this line, maybe you can just use ```RandomUtils``` to get a random integer within that range.



-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org