def connect(self):
_logger.info('<STR_LIT>', self.AMQP_URL)<EOL>while True:<EOL><INDENT>try:<EOL><INDENT>return adapters.AsyncioConnection(pika.URLParameters(self.AMQP_URL),<EOL>self.on_connection_open)<EOL><DEDENT>except AMQPConnectionError:<EOL><INDENT>asyncio.sleep(<NUM_LIT:1>)<EOL><DEDENT><DEDENT>
This method connects to RabbitMQ, returning the connection handle.
        When the connection is established, the on_connection_open method
        will be invoked by pika.

        :rtype: pika.SelectConnection