Open
Description
Consider the following circuit breaker usage:
@CircuitBreaker(name = "sameCircuitBreaker", windowMillis = "30", limit = "3")
public void someMethod1() {
}
//... elsewhere in my code
@CircuitBreaker(name = "sameCircuitBreaker", windowMillis = "60", limit = "10")
public void someMethod2() {
}
It's not determinate which of the configurations will actually be used for your app (break if 10 errors in 60ms or 3 errors in 30?). Since the first configuration will be used to instantiate the default interpreter for my circuit breaker and subsequent usages will look up the CB by name without modifying the interpreter, you can't know which config will actually be used in production. See https://github.com/Comcast/jrugged/blob/master/jrugged-aspects/src/main/java/org/fishwife/jrugged/aspects/CircuitBreakerAspect.java#L87
This could maybe be fixed if this configuration for the interpreter for each named circuit breaker was set only once separately from these circuit breaker annotations.
Metadata
Assignees
Labels
No labels
Activity