Add basic logic for producer and consumer.