Resilience4j circuit breaker using Chaos Monkey in Spring Boot

127 Views Asked by At

I'm working on a Spring Boot application where I'm utilizing the Resilience4j library for implementing circuit breaker. Now I introduce Chaos Monkey to simulate a fault in service and open the circuit. The exception is throwing, but circuit doesn't open.

ChaosMonkey config:

chaos:
  monkey:
    enabled: true
    watcher:
      service: true
    assaults:
      watched-custom-services:
        - rm.mobile.service.RmService.methodWithCircuit
      exception:
        type: rm.mobile.service.IntegrationException
        arguments[0].type: java.lang.String
        arguments[0].value: "test"

Resilience4j config:

resilience4j.circuitbreaker:
  configs:
    default:
      registerHealthIndicator: true
      slidingWindowSize: 10
      minimumNumberOfCalls: 10
      permittedNumberOfCallsInHalfOpenState: 5
      automaticTransitionFromOpenToHalfOpenEnabled: true
      waitDurationInOpenState: 2s
      failureRateThreshold: 50

Has anyone encountered a similar issue and found a solution?

0

There are 0 best solutions below