I have done small performance testing with using spring-cloud-circuitBreaker-resilience4j with Bulkhead implementation.
And I found a performance issue.
Each time when I decorate supplier by timeLimiter I created a new ScheduledExecutorService. But those executors were blocked and weren't removed from the application.
After 30 min of application working, I had almost 8000 threads.
Solution:
Executors.newSingleThreadScheduledExecutor() should be removed. TimeLimiter should be replaced by a decorator without scheduler.
Critical defect
I have done small performance testing with using spring-cloud-circuitBreaker-resilience4j with Bulkhead implementation. And I found a performance issue. Each time when I decorate supplier by timeLimiter I created a new ScheduledExecutorService. But those executors were blocked and weren't removed from the application. After 30 min of application working, I had almost 8000 threads.
Solution: Executors.newSingleThreadScheduledExecutor() should be removed. TimeLimiter should be replaced by a decorator without scheduler.