title: Java Multiple Producer and Multiple with single queue in Java?
body: <p>I have three Producers P1,P2,P3 and Three consumers with single shared queue. Producer P1 will put/insert X1,X2,X3 into queue and it should be consumed only by Consumer C1 not other Consumers(C2,C3). Basically Consumers C1 should only consume values inserted by Producer P1. the same rule applies to rest of the consumers. C2-> P2 and C3->P3.
  How to solve this problem in Java. </p>