|
Heisenberg is at |
Application-side, migration from a MP FT implementation (SmallRye) is trivial: Heisenberg consumes the standard org.eclipse.microprofile.faulttolerance.* annotations strictly. No proprietary import to replace. The deltas are about configuration, packaging and the threading model. From Resilience4j (a non-standard API), migration is more structural.
From SmallRye Fault Tolerance
SmallRye Fault Tolerance is the reference implementation in Quarkus and some Jakarta EE servers. Direct migration — Heisenberg aims at strict conformance to the same spec.
| SmallRye Fault Tolerance | Heisenberg | Note |
|---|---|---|
Annotations |
Same annotations |
No application code change. |
MP Config keys |
Same keys |
Method > class > global precedence is identical. |
Platform thread pool ( |
Virtual threads — no platform pool |
No equivalent property. Thread count self-adjusts. |
Non-spec strategies (SmallRye |
Not implemented (off-spec) |
Keep only the standard MP FT 4.1 annotations. |
Dependencies: SmallRye Common, Jandex, SmallRye Config |
None (besides Jakarta + MicroProfile APIs) |
Reduced classpath footprint. Immediate jlink compatibility. |
From Resilience4j
Resilience4j is a standalone library (no mandatory CDI). Migration requires annotation and configuration replacement.
| Resilience4j | Heisenberg | Note |
|---|---|---|
|
|
No named "registry" concept — config is per-class/per-method. |
|
|
Equivalent semantics. |
|
|
MP spec: request volume window (per-call count), no time-based window. |
|
|
|
|
Not implemented (off-spec MP FT 4.1) |
Keep Resilience4j alongside for this need, or implement at the gateway. |
|
|
No functional bridge — use plain records. |
Model difference: virtual threads vs platform pool
This is the main attention point when migrating from SmallRye or Resilience4j.
| Aspect | SmallRye / Resilience4j | Heisenberg |
|---|---|---|
Executing |
Bounded platform |
|
Memory cost per attempt |
~512 kB (OS stack) |
~5 kB (virtual stack frame) |
Saturation |
|
|
Pinning |
N/A |
|
|
If application code uses |
Configuration deltas
| SmallRye | Heisenberg |
|---|---|
|
No equivalent — virtual threads on demand. |
|
No equivalent. |
|
Same key under the |
|
Same key under the |
Porting checklist
-
Declare
heisenberg-cdi-vaubaninstead ofsmallrye-fault-toleranceorresilience4j-*. -
Verify that application annotations come from
org.eclipse.microprofile.faulttolerance.. Replace proprietary annotations (io.smallrye.faulttolerance.api.,io.github.resilience4j.*). -
Rename MP Config keys if needed —
fault-tolerance/<FQCN>/<method>/<Annotation>/<param>is the canonical form. -
Drop properties related to platform thread pools — they have no effect.
-
Audit
@Asynchronousmethods forsynchronized/ThreadLocal— switch toReentrantLock/ScopedValuewhenever possible. -
Run
./mvnw testthen./run-official-tck-mp-fault-tolerance-4.1.sh(see TCK). -
Compare a typical call before/after — retry rate, circuit opening, p99 latency.