Andrej Fink
Andrej Fink
Now with unit tests, including example use case! Ideal for virtual threads
Your current order is quite standard in industry. The Resilience4j Aspects order is the following: Retry ( CircuitBreaker ( RateLimiter ( TimeLimiter ( Bulkhead ( Function ) ) ) )...
> for adding something at the beginning or at the end, that should already be pretty simple, you just wrap the `Callable`s yourself. This is an obvious solution, no surprise...
Here is an example, ``` @Test void _bulkhead () { // the other side has set a contractual limit to 2 concurrent connections var ft = FaultTolerance.create().withDescription("_bulkhead") .withBulkhead().limit(2).done() .build(); var...
We live in VT world now: you don't need callbacks/async/reactive (including CompletableFuture) anymore 🥳 It is time for an amazing simplification. No more reactive frameworks with their ugliness and complexity....
~ "Bulkhead with timeout" ``` @Test @SneakyThrows void _bulkhead () { // the other side has set a contractual limit to 2 concurrent connections var ft = new Semaphore(2); var...
The code of your class could look like this (important snippets) ``` public class SemaphoreBulkhead extends BulkheadBase { private final Semaphore semaphore; private int timeout;// semaphore acquire timeout millis private...
VT are "async". But they are async somewhere in the depth. They are good enough for me. Oracle's Helidon Nima has completely removed Netty and uses plain old sockets +...
> You don't need the timeout there, that doesn't really change anything when it comes to the queueing semantics Without timeout, FT Bulkhead simply fails the task. See results in...