This page consolidates Heisenberg’s public surface: Maven artifacts, JPMS modules, full table of MP FT 4.1 annotations with the canonical composition order, and the fault-tolerance/* keys recognised by Ravel.
Maven artifacts
groupId |
artifactId |
Role |
|---|---|---|
|
|
Stable public SPI. Typed re-exposure of the spec + types |
|
|
Pure Java 25 policy engines without CDI: |
|
|
Single CDI interceptor ( |
|
|
Modularised repackage of |
|
|
JMH benchmarks (vs SmallRye Fault Tolerance). Not for production. |
|
|
Usage examples, standalone or integrated. |
|
|
Official MP FT 4.1 TCK runner — out of reactor (Model 4.0.0). Do not declare as an application dependency. |
All versions at 0.1.0-SNAPSHOT at the time of writing.
JPMS modules
| Module | Contents |
|---|---|
|
|
|
Internal implementations: engines, |
|
CDI integration: |
io.vidocq.heisenberg.internal.* is never exported. Any application class depending on it indicates a regression to fix.
MicroProfile Fault Tolerance 4.1 annotations
Summary table of the six annotations, in wrapping order from the outside in.
| Annotation | Level | Effect | Status |
|---|---|---|---|
|
Method |
Runs the method on a virtual thread. Return type: |
✅ |
|
Method |
Provides an alternative result on failure. Parameters: |
✅ |
|
Method or class |
CLOSED/OPEN/HALF_OPEN breaker over a sliding window. |
✅ |
|
Method or class |
Isolation via semaphore (sync) or bounded queue (async). |
✅ |
|
Method or class |
Bounds an attempt’s duration — virtual thread + |
✅ |
|
Method or class |
Bounded retries with delay, jitter, |
✅ |
Detailed parameters
@Retry
| Parameter | Default | Effect |
|---|---|---|
|
3 |
Maximum number of retries after the first attempt. -1 = unbounded (use with |
|
0 |
Base delay between attempts. |
|
|
|
|
180000 |
Total maximum duration (across all attempts). |
|
|
|
|
200 |
Random variation added to |
|
|
|
|
|
Exceptions that trigger a retry. |
|
None |
Exceptions that abort immediately (take precedence over |
@Timeout
Parameter |
Default |
Effect |
|
1000 |
Maximum duration of an attempt. |
|
|
|
Beyond that, TimeoutException is raised. For @Asynchronous, the underlying virtual thread is interrupted (best-effort).
@CircuitBreaker
Parameter |
Default |
Effect |
|
20 |
Sliding window size. |
|
0.5 |
Opening threshold (failure proportion). |
|
5000 |
OPEN state duration before transition to HALF_OPEN. |
|
|
|
|
1 |
Number of consecutive OK probes to re-close. |
|
|
Exceptions counted as failure. |
|
None |
Exceptions not counted (take precedence over |
@Bulkhead
Parameter |
Default |
Effect |
|
10 |
Maximum concurrency (semaphore permits). |
|
10 |
Waiting queue size ( |
@Fallback
Parameter |
Default |
Effect |
|
|
|
|
|
Name of a private/package-local method on the class. |
|
|
Exceptions that trigger the fallback. |
|
None |
Exceptions that skip the fallback. |
Note: value and fallbackMethod are mutually exclusive.
MicroProfile Config keys
All keys are read through ConfigProvider.getConfig(). Precedence: method > class > global > annotation default (spec §12).
| Key | Effect |
|---|---|
|
Global value. |
|
Class override. |
|
Method override — highest precedence. |
|
Boolean. |
|
Boolean. |
|
Interceptor priority ( |
Examples with their parameters:
# Global
fault-tolerance/Retry/maxRetries=5
fault-tolerance/Timeout/value=2000
fault-tolerance/CircuitBreaker/failureRatio=0.6
# Per class
fault-tolerance/io.example.CatalogClient/Retry/maxRetries=2
# Per method (highest precedence)
fault-tolerance/io.example.CatalogClient/fetch/Retry/maxRetries=1
fault-tolerance/io.example.CatalogClient/fetch/Retry/delay=500
fault-tolerance/io.example.CatalogClient/fetch/CircuitBreaker/delay=30000
fault-tolerance/io.example.CatalogClient/fetch/Bulkhead/value=20
Exceptions
| Exception | Case |
|---|---|
|
|
|
Call rejected in OPEN state. |
|
Bulkhead saturated. |
|
Generic runtime error. |
|
Invalid annotation detected at startup ( |
Vidocq SPI exposed by heisenberg-api
Public interfaces implementable by a third-party module — for instance an alternative metrics recorder.
| Type | Role |
|---|---|
|
Metrics recorder. Default implementations: |
|
Shared state registry for |
|
Invocation context: bean, method, parameters, resolved configuration. |
|
Sealed result interface: |
Compatibility
-
Java 25 (LTS), Maven 3.9.16.
-
CDI 4.1 Lite (Vauban) or any CDI 4.1 Lite-compatible container.
-
MicroProfile Config 3.1 (Ravel) in
provided. -
OpenTelemetry 1.39 (Humboldt) in
requires static— optional. -
MicroProfile Metrics 5.x (Dirac) — optional.