- route:
    from:
      uri: timer:yaml
      steps:
        - setBody:
            expression:
              constant:
                expression: Hello Camel from yaml
        - circuitBreaker:
            resilience4jConfiguration:
              minimumNumberOfCalls: 10
              failureRateThreshold: 50
              waitDurationInOpenState: 20
            steps:
              - filter:
                  expression:
                    simple:
                      expression: ${random(10)} > 2
                  steps:
                    - throwException:
                        message: Forced error
                        exceptionType: java.lang.IllegalArgumentException
        - log:
            message: "${body} (CircuitBreaker is open: ${exchangeProperty.CamelCircuitBreakerResponseShortCircuited})"
      parameters:
        period: '1000'
