-
Notifications
You must be signed in to change notification settings - Fork 120
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
Problem describe.
I uesed spring-cloud-starter-circuitbreaker-resilience4j:2020.0.3 and resilience4j-bulkhead in my project dependencies, When I read the source code, I found the following code in org.springframework.cloud.circuitbreaker.resilience4j.Resilience4jBulkheadProvider:
private <T> Supplier<CompletionStage<T>> decorateBulkhead(final String id, final Map<String, String> tags, final Supplier<T> supplier) {
BulkheadConfiguration configuration = (BulkheadConfiguration)this.configurations.computeIfAbsent(id, this.defaultConfiguration);
if (this.bulkheadRegistry.find(id).isPresent() && !this.threadPoolBulkheadRegistry.find(id).isPresent()) {
Bulkhead bulkhead = this.bulkheadRegistry.bulkhead(id, configuration.getBulkheadConfig(), tags);
CompletableFuture<T> asyncCall = CompletableFuture.supplyAsync(supplier);
return Bulkhead.decorateCompletionStage(bulkhead, () -> {
return asyncCall;
});
} else {
ThreadPoolBulkhead threadPoolBulkhead = this.threadPoolBulkheadRegistry.bulkhead(id, configuration.getThreadPoolBulkheadConfig(), tags);
return threadPoolBulkhead.decorateSupplier(supplier);
}
}
it makes Thread-pool isolation as the default isolation.And I did not find that semaphore isolation can be configured globally as the default isolation method. Can you provide a way like this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed