Queue implementation with blocked 'take()' but with eviction policy
- by mjlee
Is there an implementation with a blocking queue for take but bounded by a maximum size. However, when the maximum size is reached, instead of blocking, it will remove from the head.
One usage is that if I have a very slow consumer, the system will not crash ( runs out of memory ) rather these message will be removed.