spring-cloud-circuitbreaker icon indicating copy to clipboard operation
spring-cloud-circuitbreaker copied to clipboard

addCircuitBreakerCustomizer register events in each time when method called

Open Ferioney opened this issue 4 years ago • 8 comments

When you use Resilience4JCircuitBreakerFactory.addCircuitBreakerCustomizer() to customize an event, this event will be added in every call of the method.

We customize circuitBreaker each time when calling a method. But circuitBreaker is stored in circuitBreakerRegistry. so each time we add an event to this circuitBreaker.

In Resilience4j events store as map, that why it possible: EventProcessor

Unit test that shows defect: defectTwoSlowCircuitBreakerConsumerShouldBeCalledTwoTimesButCalledThreeTimes

Ferioney avatar Feb 12 '21 17:02 Ferioney

If we don't call the create method when normal is called I think that would solve the problem no?

ryanjbaxter avatar Feb 16 '21 16:02 ryanjbaxter

https://github.com/Ferioney/spring-cloud-circuitbreaker/blob/defect_addCircuitBreakerCustomizer/spring-cloud-circuitbreaker-resilience4j/src/test/java/org/springframework/cloud/circuitbreaker/resilience4j/Resilience4JCircuitBreakerIntegrationTest.java#L198

ryanjbaxter avatar Feb 16 '21 16:02 ryanjbaxter

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-cloud-issues avatar Feb 25 '21 04:02 spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

spring-cloud-issues avatar Mar 02 '21 16:03 spring-cloud-issues

it happened . the circuitbreaker always customize itselef in the “run” method and the event consumer will be added again

limng06 avatar Jan 18 '22 09:01 limng06

@Ferioney @limng06 can you confirm if this is still a problem with the latest release Spring Cloud 2021.0.0?

ryanjbaxter avatar Feb 07 '22 00:02 ryanjbaxter

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-cloud-issues avatar Feb 14 '22 00:02 spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

spring-cloud-issues avatar Feb 21 '22 00:02 spring-cloud-issues