code: def _on_connection_error(self, connection, error_message):
          
          self._channel = None
          if isinstance(error_message, pika_errs.AMQPConnectionError):
              error_message = repr(error_message.args[0])
          _log.error(error_message)
          self.call_later(1, self.reconnect)
docs: Callback invoked when the connection failed to be established.
  
          Args:
              connection (pika.connection.SelectConnection): The connection that
                  failed to open.
              error_message (str): The reason the connection couldn't be opened.