Implementation of producers and consumers according to requirements