def stop(self):

        if not self.m_stopping:
            self.lg("Starting Stopping", 6)
            self.stop_consumers()
            self.m_stopping = True

            self.close_channel()
            
            self.close_connection()
        
            if int(self.m_acked + self.m_nacked) >= self.m_num_amqp_msgs:
                self.lg("All mesages received a response Stopping ioloop", 6)
                self.m_connection.ioloop.stop()
            else:
                self.lg("All mesages have not responded Starting ioloop Acked(" + str(self.m_acked) + ") Nacked(" + str(self.m_nacked) + ") Expected(" + str(self.m_num_amqp_msgs) + ")", 6)
                self.m_connection.ioloop.start()

            self.lg("Done Stopping", 6)

    # end of stop
Stop the example by closing the channel and connection. We
dataset/ETHPy150Open GetLevvel/message-simulator/src/rabbit_message_publisher.py/RabbitMessagePublisher.stop