为什么我们需要queueSizeRejectionThreshold
在 Hystrix 中除了 maxQueueSize
?
根据定义,queueSizeRejectionThreshold <= maxQueueSize
。但我不明白为什么在 maxQueueSize
时不拒绝线程变满了,为什么要引入这个词queueSizeRejectionThreshold
?
最佳答案
documentation解释了您可能需要 queueSizeRejectionThreshold
的原因:
This property exists because the maxQueueSize of a BlockingQueue cannot be dynamically changed and we want to allow you to dynamically change the queue size that affects rejections.
如果您不想动态更改队列大小(在运行时),只需设置 maxQueueSize = queueSizeRejectionThreshold
。
关于hystrix - 当我已经有 max.Queue.poolSize 时,Hystrix 中的queueSizeRejectionThreshold 有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44017414/