adam bien's blog

A 6KB Circuit Breaker For Java EE Released 📎

breakr v0.0.2 was released.

...and now you can close the circuit:


@Singleton
@Interceptors(Breakr.class)
@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
public class Brittle {

    @IgnoreCallsWhen(failures = 2,slowerThanMillis = 10)
    public void unstableAndSlow(){
    }

    @CloseCircuit
    public void reset() {}
}

breakr is available in maven central as 6KB, no dependency jar:


<dependency>
   <groupId>com.airhacks</groupId>
   <artifactId>breakr</artifactId>
   <version>0.0.2</version>
</dependency>

Also checkout https://github.com/AdamBien/porcupine for 16KB implementation of bulkheads and handshaking.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.