Basic configuration for SE FT commands. No configuration support for Async or Fallback.
What should be configurable:
- Bulkhead:
- limit (int)
- queue-length (int)
- name (string)
- cancel-source (boolean)
- Circuit breaker:
- delay (duration)
- error-ratio (int)
- success-threshold (int)
- volume (int)
- name (string)
- cancel-source (boolean)
- Retry:
- name (string)
- overall-timeout (duration)
- delaying-retry-policy:
- calls (int)
- delay-millis (long)
- delay-factor (double)
- jitter-retry-policy
- calls (int)
- delay-millis (long)
- jitter (long)
- Timeout:
- timeout (duration)
- current-thread (boolean)
- name (string)
- cancel-source (boolean)
Examples
Config config = getConfig();
Bulkhead bulkhead = Bulkhead.builder()
.config(config.get("bulknhead"))
.build();
--
bulkhead:
limit: 10
queue-length: 20
name: "MyBulkhead"
cancel-source: true
Config config = getConfig();
CircuitBreaker breaker = CircuitBreaker.builder()
.config(config.get("circuitbreaker"))
.value(5) // overrides
.build();
--
circuitbreaker:
delay: "PT2S"
volume: 20
name: "MyCircuitBreaker"
Config config = getConfig();
Retry retry = Retry.builder()
.config(config.get("retry")) // will configure any retry policy too
.build();
--
retry:
overall-timeout: "PT10S"
delay-retry-policy:
calls: 5
delay-millis: 2000
delay-factor: 2