jiang017 opened a new issue, #14531:
URL: https://github.com/apache/dubbo/issues/14531

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo version: 3.1.1
   Operating System version:Windows 10
   Java version: 1.8
   Spring Boot: 2.1.18
   
   ### Steps to reproduce this issue
   
   如下图所示:
   当添加如下配置时,只有iothreads配置是有效的,其余3个属性未生效,线程池依旧是CachedThreadPool。
   
   dubbo.protocol.threadpool: fixed
   dubbo.protocol.threads: 102
   dubbo.protocol.corethreads: 11
   dubbo.protocol.iothreads: 21
   
![image](https://github.com/user-attachments/assets/f358b277-c2e2-4788-8a25-da57a1336603)
   
   
跟踪参数链路发现,在ConfigurableMetadataServiceExporter#buildServiceConfig进行了默认参数设置,最终导致配置失效。
   
   
为了使得上述配置生效,项目当前路径导入ConfigurableMetadataServiceExporter并重写buildServiceConfig方法。
   
   对以下代码进行注释,线程池参数 及 类型,均正确,达到预期。
   
   位置:ConfigurableMetadataServiceExporter#buildServiceConfig
   
   ``` java
   threadParams.put(THREADPOOL_KEY, "cached");
   threadParams.put(THREADS_KEY, "100");
   threadParams.put(CORE_THREADS_KEY, "2");
   ```
   
   
   ### What you expected to happen
   
   希望通过其它方式让线程池配置dubbo.protocol.threadpool 及 dubbo.protocol.threads 
生效,而非以上代码重写(注释)的方式。
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [X] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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