Skip to content

Commit

Permalink
Issue resilience4j#596: The Spring Boot fallback method is not invoke…
Browse files Browse the repository at this point in the history
…d when a BulkheadFullException occurs resilience4j#847

The ThreadPoolBulkhead is does not return a CompletionStage when a task could not be submitted, because the Bulkhead is full. The ThreadPoolBulkhead throws a BulkheadFullException instead. Analog to the ThreadPoolExecutor which throws the RejectedExecutionException. The BulkheadFullException is not handled correctly by the BulkheadAspect.
The BulkheadAspect should convert the BulkheadFullException into a exceptionally completed future so that the FallbackDecorator works as expected.
  • Loading branch information
RobWin authored and hexmind committed Jan 21, 2023
1 parent 14967b3 commit a350a82
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package io.github.resilience4j.bulkhead.configure;

import io.github.resilience4j.bulkhead.BulkheadFullException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.List;
Expand All @@ -23,7 +24,6 @@
import java.util.concurrent.CompletionException;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.ExecutionException;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
Expand Down

0 comments on commit a350a82

Please sign in to comment.