code: def clientConnectionFailed(self, connector, reason):
          
          _legacy_twisted_log.msg(
              "Connection to the AMQP broker failed ({reason})",
              reason=reason.value,
              logLevel=logging.WARNING,
          )
          protocol.ReconnectingClientFactory.clientConnectionFailed(
              self, connector, reason
          )
docs: Called when the client has failed to connect to the broker.
  
          See the documentation of
          `twisted.internet.protocol.ReconnectingClientFactory` for details.