code: def connect(self):
          
          _logger.info('Connecting to %s', self.AMQP_URL)
          while True:
              try:
                  return adapters.AsyncioConnection(pika.URLParameters(self.AMQP_URL),
                                                    self.on_connection_open)
              except AMQPConnectionError:
                  asyncio.sleep(1)
docs: 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