-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thread-pool-bulkhead and Bulkhead #826
Comments
Bulkhead -> Semaphore-based Bulkhead The Semaphore-based Bulkhead runs your code in the current Thread and controls the number of concurrent threads by a Semaphore. |
Thank you RobWin for the explanation, it was very helpful. I tried ThreadPool with @bulkhead annotation and I get the following error. is ThreadPoolBulkHead is supported in the current release? My Code:
{ Error: ThreadPool bulkhead is only applicable for completable futures
Your response would be highly appreciated |
Yes that's correct. The ThreadPoolBulkhead runs tasks in a thread pool and returns a CompletionStage (CompletableFuture). The method’s return type must be It's comparable to Spring's |
Thanks RobWin. You are a champ |
Hi RobWin - Can you please explain this point with the help of example? I've two downstream services which I want to call in a resilient manner i.e. Allow certain threads allocated to call to Service A and certain to call Service B. I understood the 'maxWaitDuration' and 'maxConcurrentCalls' very well. But not able to differentiate 'maxThreadPoolSize, coreThreadPoolSize, queueCapacity' from 'maxWaitDuration' and 'maxConcurrentCalls' ? Also can we use them together or we have to use either bulkhead or threadpoolbulkhead ? I gone through demo application but can't find the practical difference (or may be I'm not able to get it) |
Thanks for raising a Resilience4j issue.
Please provide a brief description of your problem along with the versions you are using.
If possible, please also consider putting together a complete JUnit test that reproduces the issue.
Resilience4j version:
1.2.0
Java version:
1.8
Problem description:
I am unable to find an example with clarity or documentation with clarity as what is ThreadPoolBuilkhead, BulkHead and Semaphore Bulkhead are the same?. I am using annotation based BulkHead pattern. I have the following configuration.
resilience4j.bulkhead:
configs:
default:
registerHealthIndicator: true
maxConcurrentCalls: 5
resilience4j.thread-pool-bulkhead:
configs:
default:
registerHealthIndicator: true
maxThreadPoolSize: 1
coreThreadPoolSize: 1
queueCapacity: 1
I have lost bit clarity on what are the key differences between the two builkhead implementations when it comes to usecases. The documentation doesn't give info regarding the same. So I need help interns of documentation or a simple clarification would help me a lot in using this library with more understanding.
Thanks
Krishna
The text was updated successfully, but these errors were encountered: