Activity queuing

Some thresholds have a built-in queue and permit you to enforce how many activities can execute concurrently by queuing all additional activities once the concurrency limit is reached, up until the set limit for the queue is exceeded.

When the number of activities exceeds the concurrency limit for a queuing threshold, new requests are queued automatically in a first-in, first-out fashion, until the queue reaches the size specified by the queuing boundary of the threshold definition. When the queue is full, the upper boundary is reached. The next request is considered to have violated the threshold, and the action specified for the threshold is applied to it. For example, an action of STOP EXECUTION causes the newly arrived work to be rejected.

You can also define the upper queuing boundary as unbounded, in which case there is no upper limit to the size of the queue. In this situation, when newly arriving work is added to the queue, the threshold is not considered to have been violated, regardless of how large the queue has become. If you define a hard limit for the upper boundary of the queue and define CONTINUE as the threshold violation action, all newly arriving work that exceeds the hard limit is considered to have violated the threshold; a threshold violation is created but the new work is still added to the queue.