If you can estimate how many maximum number of pending items can be in the queue, it is better to use a limited queue. Themes into which items are inserted in the queue can know if the queue is full after the estimated queue size.
It all depends on the task you want to complete. If you want to create threads that insert items in the queue to wait after the maximum number of pending items in the queue, you should consider a limited queue.
Limited queues will be better in terms of memory and processor, since only a limited number of elements can be in the queue (memory advantage) and will create threads that insert elements into the queue to wait if the queue is full (CPU advantage). Overall performance will be improved.
This will be of great advantage if the speed of the queue in the queue is not equal to the speed of decoupling.
source share