def connect(self, debug=False):

        results                 = build_dict("FAILED", "Not Connected", {})

        try:
    
            # Setup the Credentials
            self.lg("Setting up Credentials", 6)
            self.m_credentials  = pika.PlainCredentials(self.m_app_config["Account"]["User"], self.m_app_config["Account"]["Password"])

            # Setup the Connection Parameters
            self.lg("Setting up Connection Parameters", 6)
            self.m_conn_params  = pika.ConnectionParameters(
                                        host=self.m_host_list,
                                        credentials=self.m_credentials)

            # Setup the Connection
            self.lg("Setting up Connection", 6)
            self.m_connection   = pika.SelectConnection(pika.URLParameters(self.m_url),
                                        self.on_connection_open,
                                        stop_ioloop_on_close=False)

            self.lg("Done Building Connection", 6)

            # Setup the Channel
            results             = build_dict("SUCCESS", "Connected", {})

        except Exception,k:
            err_msg             = "Failed to establish connection with Ex(" + str(k) + ")"
            self.lg("ERROR: " + str(err_msg), 0)
            self.m_status       = "Not Connected"
            results             = build_dict("FAILED", str(err_msg), {})
        # end of try/ex

        return results
    # end of connect
This method connects to RabbitMQ, returning the connection handle.
dataset/ETHPy150Open GetLevvel/message-simulator/src/rabbit_message_publisher.py/RabbitMessagePublisher.connect