2022-03-21 Dubbo 默认线程池的线程数量为200

2022-03-21  本文已影响0人  归去来ming
<!-- 配置时未指定线程相关配置 -->
<dubbo:protocol name="dubbo" port="${dubbo.port}" />
<!-- 则等同于以下配置 -->
<dubbo:protocol name="dubbo" dispatcher="all" threadpool="fixed" threads="200" />

对应java类 ProtocolConfig:

public class ProtocolConfig extends AbstractConfig {

    private static final long serialVersionUID = 6913423882496634749L;

    // protocol name
    private String name;

    // service IP address (when there are multiple network cards available)
    private String host;

    // service port
    private Integer port;

    // context path
    private String contextpath;

    // thread pool
    private String threadpool;

    // thread pool size (fixed size)
    private Integer threads;

    // IO thread pool size (fixed size)
    private Integer iothreads;

    // thread pool's queue length
    private Integer queues;

......

Fixed对应FixedThreadPool


图片.png
上一篇 下一篇

猜你喜欢

热点阅读