So, I have several stages, stage 1 โ stage 2 โ stage 3 โ stage4, so in some cases the manufacturer will be a consumer, and at each stage several manufacturers / consumers can use several processors. In case it is appropriate that some packages will skip steps, that is, go from stage 1 to stage 4.
So, I had a class for each step that shared BlockingQueue in the previous step, but I also read that the ExecutorService works as a Producer / Consumer pattern, all in one, so Im trying to go with a better abstraction.
However, it seems to me that using the Contractor, that the producer bit is executed before they are sent to the artist, in a sequential manner, which is not what I want.
Can someone please clarify?
source
share