add while loop in RunProducer.php and RunConsumer.php