Package org.apache.camel.model
Class FaultToleranceConfigurationDefinition
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.model.FaultToleranceConfigurationCommon
org.apache.camel.model.FaultToleranceConfigurationDefinition
@Metadata(label="configuration,eip,error")
@Configurer(extended=true)
public class FaultToleranceConfigurationDefinition
extends FaultToleranceConfigurationCommon
MicroProfile Fault Tolerance Circuit Breaker EIP configuration
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionbulkheadEnabled
(boolean bulkheadEnabled) Whether bulkhead is enabled or not on the circuit breaker.bulkheadMaxConcurrentCalls
(int bulkheadMaxConcurrentCalls) Configures the max amount of concurrent calls the bulkhead will support.bulkheadWaitingTaskQueue
(int bulkheadWaitingTaskQueue) Configures the task queue size for holding waiting tasks to be processed by the bulkheaddelay
(long delay) Control how long the circuit breaker stays open.Control how long the circuit breaker stays open.end()
End of configuration.failureRatio
(int failureRatio) Configures the failure rate threshold in percentage.requestVolumeThreshold
(int requestVolumeThreshold) Controls the size of the rolling window used when the circuit breaker is closedsuccessThreshold
(int successThreshold) Controls the number of trial calls which are allowed when the circuit breaker is half-openthreadOffloadExecutorService
(String threadOffloadExecutorService) References a custom thread pool to use when offloading a guarded action to another thread.timeoutDuration
(long timeoutDuration) Configures the thread execution timeout.timeoutDuration
(String timeoutDuration) Configures the thread execution timeout.timeoutEnabled
(boolean timeoutEnabled) Whether timeout is enabled or not on the circuit breaker.timeoutPoolSize
(int poolSize) Configures the pool size of the thread pool when timeout is enabled.typedGuard
(String typedGuard) Refers to an existing io.smallrye.faulttolerance.api.TypedGuard instance to lookup and use from the registry.Methods inherited from class org.apache.camel.model.FaultToleranceConfigurationCommon
getBulkheadEnabled, getBulkheadMaxConcurrentCalls, getBulkheadWaitingTaskQueue, getDelay, getFailureRatio, getRequestVolumeThreshold, getSuccessThreshold, getThreadOffloadExecutorService, getTimeoutDuration, getTimeoutEnabled, getTimeoutPoolSize, getTypedGuard, setBulkheadEnabled, setBulkheadMaxConcurrentCalls, setBulkheadWaitingTaskQueue, setDelay, setFailureRatio, setRequestVolumeThreshold, setSuccessThreshold, setThreadOffloadExecutorService, setTimeoutDuration, setTimeoutEnabled, setTimeoutPoolSize, setTypedGuard
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
FaultToleranceConfigurationDefinition
public FaultToleranceConfigurationDefinition() -
FaultToleranceConfigurationDefinition
-
FaultToleranceConfigurationDefinition
-
-
Method Details
-
copyDefinition
- Overrides:
copyDefinition
in classFaultToleranceConfigurationCommon
-
typedGuard
Refers to an existing io.smallrye.faulttolerance.api.TypedGuard instance to lookup and use from the registry. When using this, then any other TypedGuard circuit breaker options are not in use. -
delay
Control how long the circuit breaker stays open. The default is 5 seconds. -
delay
Control how long the circuit breaker stays open. The default is 5 seconds. -
successThreshold
Controls the number of trial calls which are allowed when the circuit breaker is half-open -
requestVolumeThreshold
Controls the size of the rolling window used when the circuit breaker is closed -
failureRatio
Configures the failure rate threshold in percentage. If the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls.The threshold must be greater than 0 and not greater than 100. Default value is 50 percentage.
-
timeoutEnabled
Whether timeout is enabled or not on the circuit breaker. Default is false. -
timeoutDuration
Configures the thread execution timeout. Default value is 1 second. -
timeoutDuration
Configures the thread execution timeout. Default value is 1 second. -
timeoutPoolSize
Configures the pool size of the thread pool when timeout is enabled. Default value is 10. -
bulkheadEnabled
Whether bulkhead is enabled or not on the circuit breaker. Default is false. -
bulkheadMaxConcurrentCalls
public FaultToleranceConfigurationDefinition bulkheadMaxConcurrentCalls(int bulkheadMaxConcurrentCalls) Configures the max amount of concurrent calls the bulkhead will support. -
bulkheadWaitingTaskQueue
Configures the task queue size for holding waiting tasks to be processed by the bulkhead -
threadOffloadExecutorService
public FaultToleranceConfigurationDefinition threadOffloadExecutorService(String threadOffloadExecutorService) References a custom thread pool to use when offloading a guarded action to another thread. -
end
End of configuration.
-