def stop_consumers(self):

        if len(self.m_consumers) > 0:

            if "StopConsumers" in self.m_consumer_config:

                if self.m_consumer_config["StopConsumers"] == "At End":
                    print "Stopping Consumers(" + str(len(self.m_consumers)) + ")"

                    for consumer in self.m_consumers:

                        if consumer["PID"] != "":
                            print "\tStopping Consumer(" + str(consumer["PID"]) + ")"
                            stop_command        = "/bin/kill -9 " + str(consumer["PID"])
                            os.system(stop_command)

                    os.system("kill -9 `ps auwwx | grep python | grep mq_consumer | grep rabbit | awk '{print $2}'`")
                else:
                    print "TODO Add support for sending a 'stop message'"
            else:

                self.lg("Leaving Consumers(" + str(len(self.m_consumers)) + ") Running", 6)
                for idx,consumer in enumerate(self.m_consumers):
                    if consumer["PID"] != "":
                        self.lg("\tConsumer(" + str(idx) + ") with PID(" + str(consumer["PID"]) + ")", 6)

        else:
            self.dlg("No Consumers to Stop", 6)
        # end of if/else consumers to stop

        self.m_consumers    = {}
    
    # end of stop_consumers
dataset/ETHPy150Open GetLevvel/message-simulator/src/rabbit_message_publisher.py/RabbitMessagePublisher.stop_consumers/original