def METHOD_NAME(settings, fail_fast=False):
    """
    Return a `kombu.Connection` based on the application's settings.
    :param settings: Application settings
    :param fail_fast: Make the connection fail if we cannot get a connection
        quickly.
    """
    conn = settings.get("broker_url", "amqp://guest:guest@localhost:5672//")
    kwargs = {}
    if fail_fast:
        # Connection fallback set by`kombu.connection._extract_failover_opts`
        # Which are used when retrying a connection as sort of documented here:
        # https://kombu.readthedocs.io/en/latest/reference/kombu.connection.html#kombu.connection.Connection.ensure_connection
        # Maximum number of times to retry. If this limit is exceeded the
        # connection error will be re-raised.
        kwargs["transport_options"] = RETRY_POLICY_QUICK
    return kombu.Connection(conn, **kwargs)