code: def on_rabbitmq_conn_open(self, connection):
          
          global pending_rabbitmq_connection, rabbitmq_connection
          LOGGER.info('RabbitMQ has connected')
          rabbitmq_connection = connection
          rabbitmq_connection.add_on_close_callback(self.on_rabbitmq_close)
          rabbitmq_connection.channel(self.on_rabbitmq_channel_open)
          pending_rabbitmq_connection = None
docs: Called when RabbitMQ has been connected to.
  
          :param pika.connection.Connection connection: The pika connection