I need to build the data structure for following scenarios.
- There are multiple producer, who need to send data to consumers.
- There are multiple consumers , who need to receive data from producers
So far, this is very typical use case of mpmc queue. However, I have one more constraints.
- Every consumer must be able to read every data sent by Producer.
Of course, some consumer must be able to read second or third element while other consumer read first one, and if every consumer finish to read the first element, first element should be dropped.
Is there any known data structure for this case?