Why we need queueSizeRejectionThreshold
in Hystrix apart from maxQueueSize
?
By definition, queueSizeRejectionThreshold <= maxQueueSize
. But I am not getting why not to reject thread when maxQueueSize
becomes full, why to introduce the term queueSizeRejectionThreshold
?
The documentation explains the reason why you may need 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.
If you don't want to change the queue size dynamically (in run time) simply set maxQueueSize = queueSizeRejectionThreshold
.