You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/04/05 07:31:58 UTC
[camel] branch main updated: CAMEL-17879: remove deprecated component camel-hystrix
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new a71ee54d0ac CAMEL-17879: remove deprecated component camel-hystrix
a71ee54d0ac is described below
commit a71ee54d0ac638c76b0575405b575dc23fac3b16
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Apr 4 15:23:59 2022 +0200
CAMEL-17879: remove deprecated component camel-hystrix
---
bom/camel-bom/pom.xml | 5 -
camel-dependencies/pom.xml | 1 -
catalog/camel-allcomponents/pom.xml | 4 -
.../org/apache/camel/catalog/models.properties | 2 -
.../apache/camel/catalog/models/camelContext.json | 2 -
.../camel/catalog/models/circuitBreaker.json | 1 -
.../camel/catalog/models/hystrixConfiguration.json | 48 --
.../org/apache/camel/catalog/others.properties | 1 -
.../org/apache/camel/catalog/others/hystrix.json | 15 -
.../apache/camel/catalog/schemas/camel-spring.xsd | 316 ------------
.../camel/cdi/xml/CamelContextFactoryBean.java | 25 -
components/camel-hystrix/pom.xml | 84 ----
.../services/org/apache/camel/other.properties | 7 -
.../src/generated/resources/hystrix.json | 15 -
.../camel-hystrix/src/main/docs/hystrix.adoc | 33 --
.../hystrix/metrics/HystrixEventStreamService.java | 145 ------
.../metrics/servlet/HystrixEventStreamServlet.java | 45 --
.../hystrix/processor/HystrixConstants.java | 22 -
.../hystrix/processor/HystrixProcessor.java | 233 ---------
.../hystrix/processor/HystrixProcessorCommand.java | 212 --------
.../HystrixProcessorCommandFallbackViaNetwork.java | 68 ---
.../hystrix/processor/HystrixProcessorFactory.java | 38 --
.../hystrix/processor/HystrixReifier.java | 287 -----------
.../apache/camel/model/CircuitBreakerDefinition | 18 -
.../processor/HystrixBadRequestExceptionTest.java | 64 ---
.../hystrix/processor/HystrixCircuitOpenTest.java | 128 -----
.../processor/HystrixHierarchicalConfigTest.java | 138 ------
.../processor/HystrixInheritErrorHandlerTest.java | 56 ---
.../hystrix/processor/HystrixManagementTest.java | 125 -----
.../HystrixRouteConfigMaximumSizeTest.java | 87 ----
.../hystrix/processor/HystrixRouteConfigTest.java | 85 ----
.../processor/HystrixRouteFallbackTest.java | 55 ---
.../HystrixRouteFallbackViaNetworkTest.java | 55 ---
.../hystrix/processor/HystrixRouteOkTest.java | 86 ----
.../hystrix/processor/HystrixTimeoutTest.java | 105 ----
.../processor/HystrixTimeoutWithFallbackTest.java | 85 ----
.../SpringHystrixRouteConfigMaximumSizeTest.java | 43 --
.../processor/SpringHystrixRouteConfigRefTest.java | 43 --
.../processor/SpringHystrixRouteConfigTest.java | 43 --
.../processor/SpringHystrixRouteFallbackTest.java | 46 --
.../SpringHystrixRouteHierarchicalConfigTest.java | 77 ---
.../processor/SpringHystrixRouteOkTest.java | 45 --
.../src/test/resources/log4j2.properties | 28 --
.../SpringHystrixRouteConfigMaximumSizeTest.xml | 49 --
.../processor/SpringHystrixRouteConfigRefTest.xml | 51 --
.../processor/SpringHystrixRouteConfigTest.xml | 49 --
.../processor/SpringHystrixRouteFallbackTest.xml | 42 --
.../SpringHystrixRouteHierarchicalConfigTest.xml | 53 --
.../hystrix/processor/SpringHystrixRouteOkTest.xml | 48 --
.../org/apache/camel/spring/xml/camelContext.json | 2 -
.../camel/spring/xml/CamelContextFactoryBean.java | 29 --
.../spring/xml/handler/CamelNamespaceHandler.java | 2 -
components/pom.xml | 1 -
.../eips/examples/json/hystrixConfiguration.json | 1 -
.../src/main/docs/modules/eips/nav.adoc | 1 -
.../modules/eips/pages/circuitBreaker-eip.adoc | 3 +-
.../main/docs/modules/eips/pages/hystrix-eip.adoc | 155 ------
.../eips/pages/hystrixConfiguration-eip.adoc | 17 -
.../docs/modules/eips/pages/onFallback-eip.adoc | 1 -
.../org/apache/camel/impl/DefaultCamelContext.java | 33 --
.../java/org/apache/camel/impl/DefaultModel.java | 30 --
.../camel/impl/lw/LightweightCamelContext.java | 21 -
.../HystrixConfigurationDefinitionConfigurer.java | 278 -----------
...ache.camel.model.HystrixConfigurationDefinition | 2 -
...bbonServiceCallServiceLoadBalancerConfiguration | 2 -
.../services/org/apache/camel/model.properties | 2 -
.../org/apache/camel/model/circuitBreaker.json | 1 -
.../apache/camel/model/hystrixConfiguration.json | 48 --
.../resources/org/apache/camel/model/jaxb.index | 1 -
.../camel/model/rest/securityRequirements.json | 17 -
.../camel/model/CircuitBreakerDefinition.java | 37 --
.../camel/model/HystrixConfigurationCommon.java | 531 ---------------------
.../model/HystrixConfigurationDefinition.java | 372 ---------------
.../main/java/org/apache/camel/model/Model.java | 31 --
.../core/xml/AbstractCamelContextFactoryBean.java | 13 -
.../org/apache/camel/main/BaseMainSupport.java | 16 +-
.../camel/main/MainSupportModelConfigurer.java | 17 -
.../java/org/apache/camel/xml/in/ModelParser.java | 47 --
.../modules/others/examples/json/hystrix.json | 1 -
docs/components/modules/others/nav.adoc | 1 -
docs/components/modules/others/pages/hystrix.adoc | 1 -
.../builder/endpoint/EndpointBuilderFactory.java | 1 -
.../camel/builder/endpoint/EndpointBuilders.java | 1 -
.../builder/endpoint/StaticEndpointBuilders.java | 49 --
.../endpoint/dsl/MsvEndpointBuilderFactory.java | 427 -----------------
.../dsl/yaml/deserializers/ModelDeserializers.java | 231 ---------
.../deserializers/ModelDeserializersResolver.java | 3 -
.../src/generated/resources/camel-yaml-dsl.json | 104 ----
.../src/generated/resources/camelYamlDsl.json | 104 ----
parent/pom.xml | 6 -
90 files changed, 3 insertions(+), 5950 deletions(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 0a95a161de9..07ac40fcf8f 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1017,11 +1017,6 @@
<artifactId>camel-huaweicloud-smn</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-hystrix</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ical</artifactId>
diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index 9cb805b3cd2..68b3c76e21e 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -263,7 +263,6 @@
<httpunit-version>1.7</httpunit-version>
<huaweicloud-obs-version>3.21.4.1</huaweicloud-obs-version>
<huaweicloud-sdk-version>3.0.76</huaweicloud-sdk-version>
- <hystrix-version>1.5.18</hystrix-version>
<ical4j-version>1.0.7</ical4j-version>
<icu4j-version>70.1</icu4j-version>
<ignite-version>2.12.0</ignite-version>
diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml
index 6ccdd2c8735..5d44ab21cc0 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -661,10 +661,6 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-huaweicloud-smn</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-hystrix</artifactId>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ical</artifactId>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
index 53d3b3afd1b..6fac3f61a62 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
@@ -68,7 +68,6 @@ header
healthyServiceFilter
hl7
hl7terser
-hystrixConfiguration
ical
idempotentConsumer
inOnly
@@ -165,7 +164,6 @@ script
secureRandomParameters
security
securityDefinitions
-securityRequirements
serviceCall
serviceCallConfiguration
serviceChooserConfiguration
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/camelContext.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/camelContext.json
index 7f7a543ee13..926c5f2c0c0 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/camelContext.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/camelContext.json
@@ -60,8 +60,6 @@
"beans": { "kind": "element", "displayName": "Beans", "required": true, "type": "array", "javaType": "java.util.List<java.lang.Object>", "oneOf": [ "errorHandler" ], "deprecated": false, "autowired": false, "secret": false, "description": "Miscellaneous configurations" },
"defaultServiceCallConfiguration": { "kind": "element", "displayName": "Default Service Call Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.cloud.ServiceCallConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "ServiceCall EIP default configuration" },
"serviceCallConfiguration": { "kind": "element", "displayName": "Service Call Configuration", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.cloud.ServiceCallConfigurationDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "ServiceCall EIP configurations" },
- "defaultHystrixConfiguration": { "kind": "element", "displayName": "Default Hystrix Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.HystrixConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Hystrix EIP default configuration" },
- "hystrixConfiguration": { "kind": "element", "displayName": "Hystrix Configuration", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.HystrixConfigurationDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "Hystrix Circuit Breaker EIP configurations" },
"defaultResilience4jConfiguration": { "kind": "element", "displayName": "Default Resilience4j Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.Resilience4jConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Resilience4j EIP default configuration" },
"resilience4jConfiguration": { "kind": "element", "displayName": "Resilience4j Configuration", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.Resilience4jConfigurationDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "Resilience4j Circuit Breaker EIP configurations" },
"defaultFaultToleranceConfiguration": { "kind": "element", "displayName": "Default Fault Tolerance Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.FaultToleranceConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "MicroProfile Fault Tolerance EIP default configuration" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/circuitBreaker.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/circuitBreaker.json
index 54054748801..aaf7a376cb7 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/circuitBreaker.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/circuitBreaker.json
@@ -12,7 +12,6 @@
"output": false
},
"properties": {
- "hystrixConfiguration": { "kind": "element", "displayName": "Hystrix Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.HystrixConfigurationDefinition", "deprecated": true, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use Hystrix with the given configuration." },
"resilience4jConfiguration": { "kind": "element", "displayName": "Resilience4j Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.Resilience4jConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use Resilience4j with the given configuration." },
"faultToleranceConfiguration": { "kind": "element", "displayName": "Fault Tolerance Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.FaultToleranceConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use MicroProfile Fault Tolerance with the given configuration." },
"configuration": { "kind": "attribute", "displayName": "Configuration", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Refers to a circuit breaker configuration (such as hystrix, resillience4j, or microprofile-fault-tolerance) to use for configuring the circuit breaker EIP." },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/hystrixConfiguration.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/hystrixConfiguration.json
deleted file mode 100644
index c41c1508a10..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/hystrixConfiguration.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "model": {
- "kind": "model",
- "name": "hystrixConfiguration",
- "title": "Hystrix Configuration",
- "description": "Hystrix Circuit Breaker EIP configuration",
- "deprecated": true,
- "label": "configuration,eip",
- "javaType": "org.apache.camel.model.HystrixConfigurationDefinition",
- "abstract": false,
- "input": false,
- "output": false
- },
- "properties": {
- "groupKey": { "kind": "attribute", "displayName": "Group Key", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "CamelHystrix", "description": "Sets the group key to use. The default value is CamelHystrix." },
- "threadPoolKey": { "kind": "attribute", "displayName": "Thread Pool Key", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "CamelHystrix", "description": "Sets the thread pool key to use. Will by default use the same value as groupKey has been configured to use." },
- "circuitBreakerEnabled": { "kind": "attribute", "displayName": "Circuit Breaker Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to use a HystrixCircuitBreaker or not. If false no circuit-breaker logic will be used and all requests permitted. This is similar in effect to circuitBreakerForceClosed() except that continues tracking m [...]
- "circuitBreakerErrorThresholdPercentage": { "kind": "attribute", "displayName": "Circuit Breaker Error Threshold Percentage", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "50", "description": "Error percentage threshold (as whole number such as 50) at which point the circuit breaker will trip open and reject requests. It will stay tripped for the duration defined in [...]
- "circuitBreakerForceClosed": { "kind": "attribute", "displayName": "Circuit Breaker Force Closed", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true the HystrixCircuitBreaker#allowRequest() will always return true to allow requests regardless of the error percentage from HystrixCommandMetrics.getHealthCounts(). The circuitBreakerForceOpen() [...]
- "circuitBreakerForceOpen": { "kind": "attribute", "displayName": "Circuit Breaker Force Open", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true the HystrixCircuitBreaker.allowRequest() will always return false, causing the circuit to be open (tripped) and reject all requests. This property takes precedence over circuitBreakerForceClosed();" },
- "circuitBreakerRequestVolumeThreshold": { "kind": "attribute", "displayName": "Circuit Breaker Request Volume Threshold", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "20", "description": "Minimum number of requests in the metricsRollingStatisticalWindowInMilliseconds() that must exist before the HystrixCircuitBreaker will trip. If below this number the circuit will [...]
- "circuitBreakerSleepWindowInMilliseconds": { "kind": "attribute", "displayName": "Circuit Breaker Sleep Window In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5000", "description": "The time in milliseconds after a HystrixCircuitBreaker trips open that it should wait before trying requests again." },
- "executionIsolationSemaphoreMaxConcurrentRequests": { "kind": "attribute", "displayName": "Execution Isolation Semaphore Max Concurrent Requests", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "20", "description": "Number of concurrent requests permitted to HystrixCommand.run(). Requests beyond the concurrent limit will be rejected. Applicable only when executionIsol [...]
- "executionIsolationStrategy": { "kind": "attribute", "displayName": "Execution Isolation Strategy", "label": "command", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "THREAD", "SEMAPHORE" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "THREAD", "description": "What isolation strategy HystrixCommand.run() will be executed with. If THREAD then it will be executed on a separate thread and concurrent requests limited by the num [...]
- "executionIsolationThreadInterruptOnTimeout": { "kind": "attribute", "displayName": "Execution Isolation Thread Interrupt On Timeout", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the execution thread should attempt an interrupt (using Future#cancel ) when a thread times out. Applicable only when executionIsolationStrategy() == THREAD." },
- "executionTimeoutInMilliseconds": { "kind": "attribute", "displayName": "Execution Timeout In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "Time in milliseconds at which point the command will timeout and halt execution. If executionIsolationThreadInterruptOnTimeout == true and the command is thread-isolated, the executing threa [...]
- "executionTimeoutEnabled": { "kind": "attribute", "displayName": "Execution Timeout Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the timeout mechanism is enabled for this command" },
- "fallbackIsolationSemaphoreMaxConcurrentRequests": { "kind": "attribute", "displayName": "Fallback Isolation Semaphore Max Concurrent Requests", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Number of concurrent requests permitted to HystrixCommand.getFallback(). Requests beyond the concurrent limit will fail-fast and not attempt retrieving a fa [...]
- "fallbackEnabled": { "kind": "attribute", "displayName": "Fallback Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether HystrixCommand.getFallback() should be attempted when failure occurs." },
- "metricsHealthSnapshotIntervalInMilliseconds": { "kind": "attribute", "displayName": "Metrics Health Snapshot Interval In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "500", "description": "Time in milliseconds to wait between allowing health snapshots to be taken that calculate success and error percentages and affect HystrixCircuitBreaker.isOpen() s [...]
- "metricsRollingPercentileBucketSize": { "kind": "attribute", "displayName": "Metrics Rolling Percentile Bucket Size", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Maximum number of values stored in each bucket of the rolling percentile. This is passed into HystrixRollingPercentile inside HystrixCommandMetrics." },
- "metricsRollingPercentileEnabled": { "kind": "attribute", "displayName": "Metrics Rolling Percentile Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether percentile metrics should be captured using HystrixRollingPercentile inside HystrixCommandMetrics." },
- "metricsRollingPercentileWindowInMilliseconds": { "kind": "attribute", "displayName": "Metrics Rolling Percentile Window In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10000", "description": "Duration of percentile rolling window in milliseconds. This is passed into HystrixRollingPercentile inside HystrixCommandMetrics." },
- "metricsRollingPercentileWindowBuckets": { "kind": "attribute", "displayName": "Metrics Rolling Percentile Window Buckets", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "6", "description": "Number of buckets the rolling percentile window is broken into. This is passed into HystrixRollingPercentile inside HystrixCommandMetrics." },
- "metricsRollingStatisticalWindowInMilliseconds": { "kind": "attribute", "displayName": "Metrics Rolling Statistical Window In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10000", "description": "This property sets the duration of the statistical rolling window, in milliseconds. This is how long metrics are kept for the thread pool. The window is divi [...]
- "metricsRollingStatisticalWindowBuckets": { "kind": "attribute", "displayName": "Metrics Rolling Statistical Window Buckets", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Number of buckets the rolling statistical window is broken into. This is passed into HystrixRollingNumber inside HystrixCommandMetrics." },
- "requestLogEnabled": { "kind": "attribute", "displayName": "Request Log Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether HystrixCommand execution and events should be logged to HystrixRequestLog." },
- "corePoolSize": { "kind": "attribute", "displayName": "Core Pool Size", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Core thread-pool size that gets passed to java.util.concurrent.ThreadPoolExecutor#setCorePoolSize(int)" },
- "maximumSize": { "kind": "attribute", "displayName": "Maximum Size", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Maximum thread-pool size that gets passed to ThreadPoolExecutor#setMaximumPoolSize(int) . This is the maximum amount of concurrency that can be supported without starting to reject HystrixCommands. Please note that this setting o [...]
- "keepAliveTime": { "kind": "attribute", "displayName": "Keep Alive Time", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1", "description": "Keep-alive time in minutes that gets passed to ThreadPoolExecutor#setKeepAliveTime(long,TimeUnit)" },
- "maxQueueSize": { "kind": "attribute", "displayName": "Max Queue Size", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "-1", "description": "Max queue size that gets passed to BlockingQueue in HystrixConcurrencyStrategy.getBlockingQueue(int) This should only affect the instantiation of a threadpool - it is not eliglible to change a queue size on the fly. For that, [...]
- "queueSizeRejectionThreshold": { "kind": "attribute", "displayName": "Queue Size Rejection Threshold", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5", "description": "Queue size rejection threshold is an artificial max size at which rejections will occur even if maxQueueSize has not been reached. This is done because the maxQueueSize of a BlockingQueue can not [...]
- "threadPoolRollingNumberStatisticalWindowInMilliseconds": { "kind": "attribute", "displayName": "Thread Pool Rolling Number Statistical Window In Milliseconds", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10000", "description": "Duration of statistical rolling window in milliseconds. This is passed into HystrixRollingNumber inside each HystrixThreadPoolMetrics [...]
- "threadPoolRollingNumberStatisticalWindowBuckets": { "kind": "attribute", "displayName": "Thread Pool Rolling Number Statistical Window Buckets", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Number of buckets the rolling statistical window is broken into. This is passed into HystrixRollingNumber inside each HystrixThreadPoolMetrics instance." },
- "allowMaximumSizeToDivergeFromCoreSize": { "kind": "attribute", "displayName": "Allow Maximum Size To Diverge From Core Size", "label": "threadpool", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows the configuration for maximumSize to take effect. That value can then be equal to, or higher, than coreSize" },
- "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
- }
-}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
index 7866e724efc..3ffa5dcfd71 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
@@ -18,7 +18,6 @@ etcd3
groovy-dsl
headersmap
health
-hystrix
jasypt
java-joor-dsl
jfr
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/hystrix.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/hystrix.json
deleted file mode 100644
index cea29e51328..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/hystrix.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "other": {
- "kind": "other",
- "name": "hystrix",
- "title": "Hystrix",
- "description": "Circuit Breaker EIP using Netflix Hystrix",
- "deprecated": true,
- "firstVersion": "2.18.0",
- "label": "eip,microservice",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-hystrix",
- "version": "3.17.0-SNAPSHOT"
- }
-}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index c86ff4cc407..79239e43a9b 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -572,14 +572,6 @@ syntax.
</xs:annotation>
</xs:element>
- <xs:element name="hystrixConfiguration" type="tns:hystrixConfigurationDefinition">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Deprecated: Hystrix Circuit Breaker EIP configuration
- ]]></xs:documentation>
- </xs:annotation>
- </xs:element>
-
<xs:element name="ical" type="tns:icalDataFormat">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
@@ -3759,7 +3751,6 @@ the branch that matched. Default value: false
<xs:complexContent>
<xs:extension base="tns:output">
<xs:sequence>
- <xs:element minOccurs="0" ref="tns:hystrixConfiguration"/>
<xs:element minOccurs="0" ref="tns:resilience4jConfiguration"/>
<xs:element minOccurs="0" ref="tns:faultToleranceConfiguration"/>
<xs:choice maxOccurs="unbounded" minOccurs="0">
@@ -3843,305 +3834,6 @@ microprofile-fault-tolerance) to use for configuring the circuit breaker EIP.
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="hystrixConfigurationDefinition">
- <xs:complexContent>
- <xs:extension base="tns:hystrixConfigurationCommon">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="hystrixConfigurationCommon">
- <xs:complexContent>
- <xs:extension base="tns:identifiedType">
- <xs:sequence/>
- <xs:attribute name="groupKey" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Sets the group key to use. The default value is CamelHystrix. Default value:
-CamelHystrix
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="threadPoolKey" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Sets the thread pool key to use. Will by default use the same value as groupKey
-has been configured to use. Default value: CamelHystrix
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="circuitBreakerEnabled" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Whether to use a HystrixCircuitBreaker or not. If false no circuit-breaker logic
-will be used and all requests permitted. This is similar in effect to
-circuitBreakerForceClosed() except that continues tracking metrics and knowing
-whether it should be open/closed, this property results in not even
-instantiating a circuit-breaker. Default value: true
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="circuitBreakerErrorThresholdPercentage" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Error percentage threshold (as whole number such as 50) at which point the
-circuit breaker will trip open and reject requests. It will stay tripped for the
-duration defined in circuitBreakerSleepWindowInMilliseconds; The error
-percentage this is compared against comes from
-HystrixCommandMetrics.getHealthCounts(). Default value: 50
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="circuitBreakerForceClosed" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-If true the HystrixCircuitBreaker#allowRequest() will always return true to
-allow requests regardless of the error percentage from
-HystrixCommandMetrics.getHealthCounts(). The circuitBreakerForceOpen() property
-takes precedence so if it set to true this property does nothing. Default value:
-false
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="circuitBreakerForceOpen" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-If true the HystrixCircuitBreaker.allowRequest() will always return false,
-causing the circuit to be open (tripped) and reject all requests. This property
-takes precedence over circuitBreakerForceClosed();. Default value: false
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="circuitBreakerRequestVolumeThreshold" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Minimum number of requests in the
-metricsRollingStatisticalWindowInMilliseconds() that must exist before the
-HystrixCircuitBreaker will trip. If below this number the circuit will not trip
-regardless of error percentage. Default value: 20
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="circuitBreakerSleepWindowInMilliseconds" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-The time in milliseconds after a HystrixCircuitBreaker trips open that it should
-wait before trying requests again. Default value: 5000
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="executionIsolationSemaphoreMaxConcurrentRequests" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Number of concurrent requests permitted to HystrixCommand.run(). Requests beyond
-the concurrent limit will be rejected. Applicable only when
-executionIsolationStrategy == SEMAPHORE. Default value: 20
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="executionIsolationStrategy" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-What isolation strategy HystrixCommand.run() will be executed with. If THREAD
-then it will be executed on a separate thread and concurrent requests limited by
-the number of threads in the thread-pool. If SEMAPHORE then it will be executed
-on the calling thread and concurrent requests limited by the semaphore count.
-Default value: THREAD
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="executionIsolationThreadInterruptOnTimeout" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Whether the execution thread should attempt an interrupt (using Future#cancel )
-when a thread times out. Applicable only when executionIsolationStrategy() ==
-THREAD. Default value: true
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="executionTimeoutInMilliseconds" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Time in milliseconds at which point the command will timeout and halt execution.
-If executionIsolationThreadInterruptOnTimeout == true and the command is
-thread-isolated, the executing thread will be interrupted. If the command is
-semaphore-isolated and a HystrixObservableCommand, that command will get
-unsubscribed. Default value: 1000
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="executionTimeoutEnabled" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Whether the timeout mechanism is enabled for this command. Default value: true
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="fallbackIsolationSemaphoreMaxConcurrentRequests" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Number of concurrent requests permitted to HystrixCommand.getFallback().
-Requests beyond the concurrent limit will fail-fast and not attempt retrieving a
-fallback. Default value: 10
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="fallbackEnabled" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Whether HystrixCommand.getFallback() should be attempted when failure occurs.
-Default value: true
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="metricsHealthSnapshotIntervalInMilliseconds" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Time in milliseconds to wait between allowing health snapshots to be taken that
-calculate success and error percentages and affect
-HystrixCircuitBreaker.isOpen() status. On high-volume circuits the continual
-calculation of error percentage can become CPU intensive thus this controls how
-often it is calculated. Default value: 500
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="metricsRollingPercentileBucketSize" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Maximum number of values stored in each bucket of the rolling percentile. This
-is passed into HystrixRollingPercentile inside HystrixCommandMetrics. Default
-value: 10
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="metricsRollingPercentileEnabled" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Whether percentile metrics should be captured using HystrixRollingPercentile
-inside HystrixCommandMetrics. Default value: true
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="metricsRollingPercentileWindowInMilliseconds" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Duration of percentile rolling window in milliseconds. This is passed into
-HystrixRollingPercentile inside HystrixCommandMetrics. Default value: 10000
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="metricsRollingPercentileWindowBuckets" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Number of buckets the rolling percentile window is broken into. This is passed
-into HystrixRollingPercentile inside HystrixCommandMetrics. Default value: 6
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="metricsRollingStatisticalWindowInMilliseconds" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-This property sets the duration of the statistical rolling window, in
-milliseconds. This is how long metrics are kept for the thread pool. The window
-is divided into buckets and rolls by those increments. Default value: 10000
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="metricsRollingStatisticalWindowBuckets" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Number of buckets the rolling statistical window is broken into. This is passed
-into HystrixRollingNumber inside HystrixCommandMetrics. Default value: 10
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="requestLogEnabled" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Whether HystrixCommand execution and events should be logged to
-HystrixRequestLog. Default value: true
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="corePoolSize" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Core thread-pool size that gets passed to
-java.util.concurrent.ThreadPoolExecutor#setCorePoolSize(int). Default value: 10
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="maximumSize" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Maximum thread-pool size that gets passed to
-ThreadPoolExecutor#setMaximumPoolSize(int) . This is the maximum amount of
-concurrency that can be supported without starting to reject HystrixCommands.
-Please note that this setting only takes effect if you also set
-allowMaximumSizeToDivergeFromCoreSize. Default value: 10
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="keepAliveTime" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Keep-alive time in minutes that gets passed to
-ThreadPoolExecutor#setKeepAliveTime(long,TimeUnit). Default value: 1
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="maxQueueSize" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Max queue size that gets passed to BlockingQueue in
-HystrixConcurrencyStrategy.getBlockingQueue(int) This should only affect the
-instantiation of a threadpool - it is not eliglible to change a queue size on
-the fly. For that, use queueSizeRejectionThreshold(). Default value: -1
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="queueSizeRejectionThreshold" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Queue size rejection threshold is an artificial max size at which rejections
-will occur even if maxQueueSize has not been reached. This is done because the
-maxQueueSize of a BlockingQueue can not be dynamically changed and we want to
-support dynamically changing the queue size that affects rejections. This is
-used by HystrixCommand when queuing a thread for execution. Default value: 5
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="threadPoolRollingNumberStatisticalWindowInMilliseconds" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Duration of statistical rolling window in milliseconds. This is passed into
-HystrixRollingNumber inside each HystrixThreadPoolMetrics instance. Default
-value: 10000
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="threadPoolRollingNumberStatisticalWindowBuckets" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Number of buckets the rolling statistical window is broken into. This is passed
-into HystrixRollingNumber inside each HystrixThreadPoolMetrics instance. Default
-value: 10
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="allowMaximumSizeToDivergeFromCoreSize" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Allows the configuration for maximumSize to take effect. That value can then be
-equal to, or higher, than coreSize. Default value: false
- ]]></xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
<xs:complexType name="resilience4JConfigurationDefinition">
<xs:complexContent>
<xs:extension base="tns:resilience4JConfigurationCommon">
@@ -14906,14 +14598,6 @@ ServiceCall EIP default configuration.
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:serviceCallConfiguration"/>
- <xs:element minOccurs="0" name="defaultHystrixConfiguration" type="tns:hystrixConfigurationDefinition">
- <xs:annotation>
- <xs:documentation xml:lang="en"><![CDATA[
-Hystrix EIP default configuration.
- ]]></xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:hystrixConfiguration"/>
<xs:element minOccurs="0" name="defaultResilience4jConfiguration" type="tns:resilience4JConfigurationDefinition">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
diff --git a/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java b/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
index 6a83b12230d..97cb8d27c0b 100644
--- a/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
+++ b/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
@@ -47,7 +47,6 @@ import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.model.ContextScanDefinition;
import org.apache.camel.model.FaultToleranceConfigurationDefinition;
import org.apache.camel.model.GlobalOptionsDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.InterceptDefinition;
import org.apache.camel.model.InterceptFromDefinition;
import org.apache.camel.model.InterceptSendToEndpointDefinition;
@@ -229,12 +228,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Def
@XmlElement(name = "serviceCallConfiguration", type = ServiceCallConfigurationDefinition.class)
private List<ServiceCallConfigurationDefinition> serviceCallConfigurations;
- @XmlElement(name = "defaultHystrixConfiguration")
- private HystrixConfigurationDefinition defaultHystrixConfiguration;
-
- @XmlElement(name = "hystrixConfiguration", type = HystrixConfigurationDefinition.class)
- private List<HystrixConfigurationDefinition> hystrixConfigurations;
-
@XmlElement(name = "defaultResilience4jConfiguration")
private Resilience4jConfigurationDefinition defaultResilience4jConfiguration;
@@ -440,24 +433,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Def
this.serviceCallConfigurations = serviceCallConfigurations;
}
- @Override
- public HystrixConfigurationDefinition getDefaultHystrixConfiguration() {
- return defaultHystrixConfiguration;
- }
-
- public void setDefaultHystrixConfiguration(HystrixConfigurationDefinition defaultHystrixConfiguration) {
- this.defaultHystrixConfiguration = defaultHystrixConfiguration;
- }
-
- @Override
- public List<HystrixConfigurationDefinition> getHystrixConfigurations() {
- return hystrixConfigurations;
- }
-
- public void setHystrixConfigurations(List<HystrixConfigurationDefinition> hystrixConfigurations) {
- this.hystrixConfigurations = hystrixConfigurations;
- }
-
@Override
public Resilience4jConfigurationDefinition getDefaultResilience4jConfiguration() {
return defaultResilience4jConfiguration;
diff --git a/components/camel-hystrix/pom.xml b/components/camel-hystrix/pom.xml
deleted file mode 100644
index 90342da52c0..00000000000
--- a/components/camel-hystrix/pom.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel</groupId>
- <artifactId>components</artifactId>
- <version>3.17.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-hystrix</artifactId>
- <packaging>jar</packaging>
-
- <name>Camel :: Hystrix (deprecated)</name>
- <description>Circuit Breaker EIP using Netflix Hystrix</description>
-
- <properties>
- <firstVersion>2.18.0</firstVersion>
- <label>eip,microservice</label>
-
- </properties>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core-reifier</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.netflix.hystrix</groupId>
- <artifactId>hystrix-core</artifactId>
- <version>${hystrix-version}</version>
- </dependency>
- <dependency>
- <groupId>com.netflix.hystrix</groupId>
- <artifactId>hystrix-metrics-event-stream</artifactId>
- <version>${hystrix-version}</version>
- </dependency>
-
- <!-- servlet api -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-management</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/components/camel-hystrix/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/components/camel-hystrix/src/generated/resources/META-INF/services/org/apache/camel/other.properties
deleted file mode 100644
index fc1b1a43b4e..00000000000
--- a/components/camel-hystrix/src/generated/resources/META-INF/services/org/apache/camel/other.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-name=hystrix
-groupId=org.apache.camel
-artifactId=camel-hystrix
-version=3.17.0-SNAPSHOT
-projectName=Camel :: Hystrix (deprecated)
-projectDescription=Circuit Breaker EIP using Netflix Hystrix
diff --git a/components/camel-hystrix/src/generated/resources/hystrix.json b/components/camel-hystrix/src/generated/resources/hystrix.json
deleted file mode 100644
index cea29e51328..00000000000
--- a/components/camel-hystrix/src/generated/resources/hystrix.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "other": {
- "kind": "other",
- "name": "hystrix",
- "title": "Hystrix",
- "description": "Circuit Breaker EIP using Netflix Hystrix",
- "deprecated": true,
- "firstVersion": "2.18.0",
- "label": "eip,microservice",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-hystrix",
- "version": "3.17.0-SNAPSHOT"
- }
-}
diff --git a/components/camel-hystrix/src/main/docs/hystrix.adoc b/components/camel-hystrix/src/main/docs/hystrix.adoc
deleted file mode 100644
index dc434cbb409..00000000000
--- a/components/camel-hystrix/src/main/docs/hystrix.adoc
+++ /dev/null
@@ -1,33 +0,0 @@
-= Hystrix Component (deprecated)
-:doctitle: Hystrix
-:shortname: hystrix
-:artifactid: camel-hystrix
-:description: Circuit Breaker EIP using Netflix Hystrix
-:since: 2.18
-:supportlevel: Stable-deprecated
-:deprecated: *deprecated*
-//Manually maintained attributes
-:camel-spring-boot-name: hystrix
-
-*Since Camel {since}*
-
-The Hystrix component integrates Netflix Hystrix circuit breaker in Camel routes.
-
-For more details see the Hystrix EIP documentation.
-
-Maven users will need to add the following dependency to their `pom.xml`
-for this component:
-
-[source,xml]
-----
-<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-hystrix</artifactId>
- <version>x.x.x</version>
- <!-- use the same version as your Camel core version -->
-</dependency>
-----
-
-
-
-include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/metrics/HystrixEventStreamService.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/metrics/HystrixEventStreamService.java
deleted file mode 100644
index 4b210f8fa6b..00000000000
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/metrics/HystrixEventStreamService.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.metrics;
-
-import java.util.Queue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.stream.Stream;
-
-import com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsPoller;
-import org.apache.camel.StaticService;
-import org.apache.camel.api.management.ManagedAttribute;
-import org.apache.camel.api.management.ManagedOperation;
-import org.apache.camel.api.management.ManagedResource;
-import org.apache.camel.component.hystrix.metrics.servlet.HystrixEventStreamServlet;
-import org.apache.camel.support.service.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * To gather hystrix metrics and offer the metrics over JMX and Java APIs.
- * <p/>
- * If you want to expose the metrics over HTTP then you can use the {@link HystrixEventStreamServlet} servlet which
- * provides such functionality.
- */
-@ManagedResource(description = "Managed Hystrix EventStreamService")
-public class HystrixEventStreamService extends ServiceSupport
- implements StaticService, HystrixMetricsPoller.MetricsAsJsonPollerListener {
-
- public static final int METRICS_QUEUE_SIZE = 1000;
-
- private static final Logger LOG = LoggerFactory.getLogger(HystrixEventStreamService.class);
- private int delay = 500;
- private int queueSize = METRICS_QUEUE_SIZE;
- private HystrixMetricsPoller poller;
- // use a queue with a upper limit to avoid storing too many metrics
- private Queue<String> queue;
-
- public int getDelay() {
- return delay;
- }
-
- /**
- * Sets the delay in millis how often the poller runs
- */
- public void setDelay(int delay) {
- this.delay = delay;
- }
-
- public int getQueueSize() {
- return queueSize;
- }
-
- /**
- * Sets the queue size for how many metrics collected are stored in-memory in a backlog
- */
- public void setQueueSize(int queueSize) {
- this.queueSize = queueSize;
- }
-
- /**
- * Return a stream of the JSON metrics.
- */
- public Stream<String> streamMetrics() {
- if (queue != null) {
- return queue.stream();
- } else {
- return null;
- }
- }
-
- @ManagedOperation(description = "Returns the oldest metrics as JSON format")
- public String oldestMetricsAsJSon() {
- if (queue != null) {
- return queue.peek();
- } else {
- return null;
- }
- }
-
- @ManagedOperation(description = "Starts the metrics poller")
- public void startPoller() {
- poller.start();
- }
-
- @ManagedOperation(description = "Pauses the metrics poller")
- public void pausePoller() {
- poller.pause();
- }
-
- @ManagedAttribute(description = "Is the metrics poller running")
- public boolean isPollerRunning() {
- return poller.isRunning();
- }
-
- @ManagedAttribute(description = "The delay in millis the poller is running")
- public int getPollerDelay() {
- return delay;
- }
-
- @Override
- protected void doStart() throws Exception {
- LOG.info("Starting HystrixMetricsPoller with delay: {} and queue size: {}", delay, queueSize);
- queue = new LinkedBlockingQueue<>(queueSize);
- poller = new HystrixMetricsPoller(this, delay);
- poller.start();
- }
-
- @Override
- protected void doStop() throws Exception {
- if (poller != null) {
- LOG.info("Shutting down HystrixMetricsPoller");
- poller.shutdown();
- }
- }
-
- @Override
- public void handleJsonMetric(String json) {
- LOG.debug("handleJsonMetric: {}", json);
-
- // ensure there is space on the queue by polling until at least single slot is free
- int drain = queue.size() - queueSize + 1;
- if (drain > 0) {
- LOG.debug("Draining queue to make room: {}", drain);
- for (int i = 0; i < drain; i++) {
- queue.poll();
- }
- }
-
- queue.add(json);
- }
-}
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/metrics/servlet/HystrixEventStreamServlet.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/metrics/servlet/HystrixEventStreamServlet.java
deleted file mode 100644
index acae0363a12..00000000000
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/metrics/servlet/HystrixEventStreamServlet.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.metrics.servlet;
-
-/**
- * Streams Hystrix metrics in text/event-stream format.
- * <p/>
- * Install by:
- * <p/>
- * 1) Including camel-hystrix-*.jar in your classpath.
- * <p/>
- * 2) Adding the following to web.xml:
- *
- * <pre>
- * {@code
- * <servlet>
- * <display-name>HystrixEventStreamServlet</display-name>
- * <servlet-name>HystrixEventStreamServlet</servlet-name>
- * <servlet-class>org.apache.camel.component.hystrix.metrics.servlet.HystrixEventStreamServlet</servlet-class>
- * </servlet>
- * <servlet-mapping>
- * <servlet-name>HystrixEventStreamServlet</servlet-name>
- * <url-pattern>/hystrix.stream</url-pattern>
- * </servlet-mapping>
- * }
- * </pre>
- * <p/>
- * See more details at: https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-metrics-event-stream
- */
-public class HystrixEventStreamServlet extends com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet {
-}
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixConstants.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixConstants.java
deleted file mode 100644
index 06fbb59d8df..00000000000
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-public interface HystrixConstants {
- String DEFAULT_HYSTRIX_CONFIGURATION_ID = "hystrix-configuration";
-
-}
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessor.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessor.java
deleted file mode 100644
index 0210262ed5a..00000000000
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessor.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.netflix.hystrix.HystrixCircuitBreaker;
-import com.netflix.hystrix.HystrixCommand;
-import com.netflix.hystrix.HystrixCommandGroupKey;
-import com.netflix.hystrix.HystrixCommandKey;
-import com.netflix.hystrix.HystrixCommandMetrics;
-import org.apache.camel.AsyncCallback;
-import org.apache.camel.Exchange;
-import org.apache.camel.ExchangePropertyKey;
-import org.apache.camel.Navigate;
-import org.apache.camel.Processor;
-import org.apache.camel.api.management.ManagedAttribute;
-import org.apache.camel.api.management.ManagedResource;
-import org.apache.camel.spi.CircuitBreakerConstants;
-import org.apache.camel.spi.IdAware;
-import org.apache.camel.support.AsyncProcessorSupport;
-
-/**
- * Implementation of the Hystrix EIP.
- */
-@ManagedResource(description = "Managed Hystrix Processor")
-public class HystrixProcessor extends AsyncProcessorSupport
- implements Navigate<Processor>, org.apache.camel.Traceable, IdAware {
-
- private String id;
- private final HystrixCommandGroupKey groupKey;
- private final HystrixCommandKey commandKey;
- private final HystrixCommandKey fallbackCommandKey;
- private final com.netflix.hystrix.HystrixCommand.Setter setter;
- private final com.netflix.hystrix.HystrixCommand.Setter fallbackSetter;
- private final Processor processor;
- private final Processor fallback;
- private final boolean fallbackViaNetwork;
-
- public HystrixProcessor(HystrixCommandGroupKey groupKey, HystrixCommandKey commandKey, HystrixCommandKey fallbackCommandKey,
- HystrixCommand.Setter setter, HystrixCommand.Setter fallbackSetter,
- Processor processor, Processor fallback, boolean fallbackViaNetwork) {
- this.groupKey = groupKey;
- this.commandKey = commandKey;
- this.fallbackCommandKey = fallbackCommandKey;
- this.setter = setter;
- this.fallbackSetter = fallbackSetter;
- this.processor = processor;
- this.fallback = fallback;
- this.fallbackViaNetwork = fallbackViaNetwork;
- }
-
- @ManagedAttribute
- public String getHystrixCommandKey() {
- return commandKey.name();
- }
-
- @ManagedAttribute
- public String getHystrixFallbackCommandKey() {
- if (fallbackCommandKey != null) {
- return fallbackCommandKey.name();
- } else {
- return null;
- }
- }
-
- @ManagedAttribute
- public String getHystrixGroupKey() {
- return groupKey.name();
- }
-
- // TODO Recursion?
- @ManagedAttribute
- public boolean isFallbackViaNetwork() {
- return isFallbackViaNetwork();
- }
-
- @ManagedAttribute
- public int getHystrixTotalTimeMean() {
- HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
- if (metrics != null) {
- return metrics.getTotalTimeMean();
- }
- return 0;
- }
-
- @ManagedAttribute
- public int getHystrixExecutionTimeMean() {
- HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
- if (metrics != null) {
- return metrics.getExecutionTimeMean();
- }
- return 0;
- }
-
- @ManagedAttribute
- public int getHystrixCurrentConcurrentExecutionCount() {
- HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
- if (metrics != null) {
- return metrics.getCurrentConcurrentExecutionCount();
- }
- return 0;
- }
-
- @ManagedAttribute
- public long getHystrixTotalRequests() {
- HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
- if (metrics != null) {
- return metrics.getHealthCounts().getTotalRequests();
- }
- return 0;
- }
-
- @ManagedAttribute
- public long getHystrixErrorCount() {
- HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
- if (metrics != null) {
- return metrics.getHealthCounts().getErrorCount();
- }
- return 0;
- }
-
- @ManagedAttribute
- public int getHystrixErrorPercentage() {
- HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
- if (metrics != null) {
- return metrics.getHealthCounts().getErrorPercentage();
- }
- return 0;
- }
-
- @ManagedAttribute
- public boolean isCircuitBreakerOpen() {
- HystrixCircuitBreaker cb = HystrixCircuitBreaker.Factory.getInstance(commandKey);
- if (cb != null) {
- return cb.isOpen();
- }
- return false;
- }
-
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public String getTraceLabel() {
- return "hystrix";
- }
-
- @Override
- public List<Processor> next() {
- if (!hasNext()) {
- return null;
- }
- List<Processor> answer = new ArrayList<>();
- answer.add(processor);
- if (fallback != null) {
- answer.add(fallback);
- }
- return answer;
- }
-
- @Override
- public boolean hasNext() {
- return true;
- }
-
- @Override
- public boolean process(Exchange exchange, AsyncCallback callback) {
- // run this as if we run inside try .. catch so there is no regular Camel error handler
- exchange.setProperty(ExchangePropertyKey.TRY_ROUTE_BLOCK, true);
-
- try {
- HystrixProcessorCommandFallbackViaNetwork fallbackCommand = null;
- if (fallbackViaNetwork) {
- fallbackCommand = new HystrixProcessorCommandFallbackViaNetwork(fallbackSetter, exchange, fallback);
- }
- HystrixProcessorCommand command
- = new HystrixProcessorCommand(setter, exchange, processor, fallback, fallbackCommand);
- command.execute();
-
- // enrich exchange with details from hystrix about the command execution
- commandResponse(exchange, command);
-
- } catch (Throwable e) {
- exchange.setException(e);
- }
-
- exchange.removeProperty(ExchangePropertyKey.TRY_ROUTE_BLOCK);
- callback.done(true);
- return true;
- }
-
- private void commandResponse(Exchange exchange, HystrixCommand command) {
- exchange.setProperty(CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION, command.isSuccessfulExecution());
- exchange.setProperty(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK, command.isResponseFromFallback());
- exchange.setProperty(CircuitBreakerConstants.RESPONSE_SHORT_CIRCUITED, command.isResponseShortCircuited());
- exchange.setProperty(CircuitBreakerConstants.RESPONSE_TIMED_OUT, command.isResponseTimedOut());
- exchange.setProperty(CircuitBreakerConstants.RESPONSE_REJECTED, command.isResponseRejected());
- }
-
- @Override
- protected void doStart() throws Exception {
- // noop
- }
-
- @Override
- protected void doStop() throws Exception {
- // noop
- }
-
-}
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.java
deleted file mode 100644
index 520b066dd73..00000000000
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import com.netflix.hystrix.HystrixCommand;
-import com.netflix.hystrix.exception.HystrixBadRequestException;
-import org.apache.camel.CamelExchangeException;
-import org.apache.camel.Exchange;
-import org.apache.camel.ExchangePropertyKey;
-import org.apache.camel.ExtendedCamelContext;
-import org.apache.camel.ExtendedExchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.Route;
-import org.apache.camel.spi.UnitOfWork;
-import org.apache.camel.support.ExchangeHelper;
-import org.apache.camel.support.UnitOfWorkHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Hystrix Command for the Camel Hystrix EIP.
- */
-public class HystrixProcessorCommand extends HystrixCommand {
-
- private static final Logger LOG = LoggerFactory.getLogger(HystrixProcessorCommand.class);
- private final Exchange exchange;
- private final Processor processor;
- private final Processor fallback;
- private final HystrixProcessorCommandFallbackViaNetwork fallbackCommand;
- private final AtomicBoolean fallbackInUse = new AtomicBoolean();
- private final Object lock = new Object();
-
- public HystrixProcessorCommand(Setter setter, Exchange exchange, Processor processor, Processor fallback,
- HystrixProcessorCommandFallbackViaNetwork fallbackCommand) {
- super(setter);
- this.exchange = exchange;
- this.processor = processor;
- this.fallback = fallback;
- this.fallbackCommand = fallbackCommand;
- }
-
- @Override
- protected Message getFallback() {
- // if bad request then break-out
- if (exchange.getException() instanceof HystrixBadRequestException) {
- return null;
- }
-
- // guard by lock as the run command can be running concurrently in case hystrix caused a timeout which
- // can cause the fallback timer to trigger this fallback at the same time the run command may be running
- // after its processor.process method which could cause both threads to mutate the state on the exchange
- synchronized (lock) {
- fallbackInUse.set(true);
- }
-
- if (fallback == null && fallbackCommand == null) {
- // no fallback in use
- throw new UnsupportedOperationException("No fallback available.");
- }
-
- // grab the exception that caused the error (can be failure in run, or from hystrix if short circuited)
- Throwable exception = getExecutionException();
-
- if (exception != null) {
- LOG.debug("Error occurred processing. Will now run fallback. Exception class: {} message: {}.",
- exception.getClass().getName(), exception.getMessage());
- } else {
- LOG.debug("Error occurred processing. Will now run fallback.");
- }
- // store the last to endpoint as the failure endpoint
- if (exchange.getProperty(ExchangePropertyKey.FAILURE_ENDPOINT) == null) {
- exchange.setProperty(ExchangePropertyKey.FAILURE_ENDPOINT, exchange.getProperty(ExchangePropertyKey.TO_ENDPOINT));
- }
- // give the rest of the pipeline another chance
- exchange.setProperty(ExchangePropertyKey.EXCEPTION_HANDLED, true);
- exchange.setProperty(ExchangePropertyKey.EXCEPTION_CAUGHT, exception);
- exchange.setRouteStop(false);
- exchange.setException(null);
- // and we should not be regarded as exhausted as we are in a try .. catch block
- exchange.adapt(ExtendedExchange.class).setRedeliveryExhausted(false);
- // run the fallback processor
- try {
- // use fallback command if provided (fallback via network)
- if (fallbackCommand != null) {
- return fallbackCommand.execute();
- } else {
- LOG.debug("Running fallback: {} with exchange: {}", fallback, exchange);
- // process the fallback until its fully done
- // (we do not hav any hystrix callback to leverage so we need to complete all work in this run method)
- fallback.process(exchange);
- LOG.debug("Running fallback: {} with exchange: {} done", fallback, exchange);
- }
- } catch (Exception e) {
- exchange.setException(e);
- }
-
- return exchange.getMessage();
- }
-
- @Override
- protected Message run() throws Exception {
- Exchange copy = null;
- UnitOfWork uow = null;
-
- LOG.debug("Running processor: {} with exchange: {}", processor, exchange);
-
- // prepare a copy of exchange so downstream processors don't cause side-effects if they mutate the exchange
- // in case Hystrix timeout processing and continue with the fallback etc
- copy = ExchangeHelper.createCorrelatedCopy(exchange, false, false);
-
- // prepare uow on copy
- uow = copy.getContext().adapt(ExtendedCamelContext.class).getUnitOfWorkFactory().createUnitOfWork(copy);
- copy.adapt(ExtendedExchange.class).setUnitOfWork(uow);
- // the copy must be starting from the route where its copied from
- Route route = ExchangeHelper.getRoute(exchange);
- if (route != null) {
- uow.pushRoute(route);
- }
- try {
- // process the processor until its fully done
- // (we do not hav any hystrix callback to leverage so we need to complete all work in this run method)
- processor.process(copy);
- } catch (Exception e) {
- copy.setException(e);
- }
-
- // if hystrix execution timeout is enabled and fallback is enabled and a timeout occurs
- // then a hystrix timer thread executes the fallback so we can stop run() execution
- if (getProperties().executionTimeoutEnabled().get()
- && getProperties().fallbackEnabled().get()
- && isCommandTimedOut.get() == TimedOutStatus.TIMED_OUT) {
- LOG.debug("Exiting run command due to a hystrix execution timeout in processing exchange: {}", exchange);
- // must done uow
- UnitOfWorkHelper.doneUow(uow, copy);
- return null;
- }
-
- // when a hystrix timeout occurs then a hystrix timer thread executes the fallback
- // and therefore we need this thread to not do anymore if fallback is already in process
- if (fallbackInUse.get()) {
- LOG.debug("Exiting run command as fallback is already in use processing exchange: {}", exchange);
- // must done uow
- UnitOfWorkHelper.doneUow(uow, copy);
- return null;
- }
-
- // remember any hystrix execution exception which for example can be triggered by a hystrix timeout
- Throwable hystrixExecutionException = getExecutionException();
- Exception camelExchangeException = copy.getException();
-
- synchronized (lock) {
- // when a hystrix timeout occurs then a hystrix timer thread executes the fallback
- // and therefore we need this thread to not do anymore if fallback is already in process
- if (fallbackInUse.get()) {
- LOG.debug("Exiting run command as fallback is already in use processing exchange: {}", exchange);
- // must done uow
- UnitOfWorkHelper.doneUow(uow, copy);
- return null;
- }
-
- // execution exception must take precedence over exchange exception
- // because hystrix may have caused this command to fail due timeout or something else
- if (hystrixExecutionException != null) {
- exchange.setException(new CamelExchangeException(
- "Hystrix execution exception occurred while processing Exchange", exchange, hystrixExecutionException));
- }
-
- // special for HystrixBadRequestException which should not trigger fallback
- if (camelExchangeException instanceof HystrixBadRequestException) {
- LOG.debug("Running processor: {} with exchange: {} done as bad request", processor, exchange);
- exchange.setException(camelExchangeException);
- // must done uow
- UnitOfWorkHelper.doneUow(uow, copy);
- throw camelExchangeException;
- }
-
- // copy the result before its regarded as success
- ExchangeHelper.copyResults(exchange, copy);
-
- // must done uow
- UnitOfWorkHelper.doneUow(uow, copy);
-
- // in case of an exception in the exchange
- // we need to trigger this by throwing the exception so hystrix will execute the fallback
- // or open the circuit
- if (hystrixExecutionException == null && camelExchangeException != null) {
- throw camelExchangeException;
- }
-
- LOG.debug("Running processor: {} with exchange: {} done", processor, exchange);
- return exchange.getMessage();
- }
- }
-
-}
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommandFallbackViaNetwork.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommandFallbackViaNetwork.java
deleted file mode 100644
index 6bdd1bca19d..00000000000
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommandFallbackViaNetwork.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import com.netflix.hystrix.HystrixCommand;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Hystrix Command the Camel Hystrix EIP when executing fallback. The fallback may require networking and therefore
- * should run in another Hystrix Command
- */
-public class HystrixProcessorCommandFallbackViaNetwork extends HystrixCommand<Message> {
-
- private static final Logger LOG = LoggerFactory.getLogger(HystrixProcessorCommandFallbackViaNetwork.class);
- private final Exchange exchange;
- private final Processor processor;
-
- public HystrixProcessorCommandFallbackViaNetwork(Setter setter, Exchange exchange, Processor processor) {
- super(setter);
- this.exchange = exchange;
- this.processor = processor;
- }
-
- @Override
- protected Message getFallback() {
- return null;
- }
-
- @Override
- protected Message run() throws Exception {
- LOG.debug("Running fallback processor: {} with exchange: {}", processor, exchange);
-
- try {
- // process the processor until its fully done
- // (we do not hav any hystrix callback to leverage so we need to complete all work in this run method)
- processor.process(exchange);
- } catch (Throwable e) {
- exchange.setException(e);
- }
-
- // if we failed then throw an exception to signal that the fallback failed as well
- if (exchange.getException() != null) {
- throw exchange.getException();
- }
-
- LOG.debug("Running fallback processor: {} with exchange: {} done", processor, exchange);
- // no fallback then we are done
- return exchange.getMessage();
- }
-}
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorFactory.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorFactory.java
deleted file mode 100644
index 5674f7b7939..00000000000
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.Processor;
-import org.apache.camel.Route;
-import org.apache.camel.model.CircuitBreakerDefinition;
-import org.apache.camel.support.TypedProcessorFactory;
-
-/**
- * To integrate camel-hystrix with the Camel routes using the Hystrix EIP.
- */
-public class HystrixProcessorFactory extends TypedProcessorFactory<CircuitBreakerDefinition> {
-
- public HystrixProcessorFactory() {
- super(CircuitBreakerDefinition.class);
- }
-
- @Override
- public Processor doCreateProcessor(Route route, CircuitBreakerDefinition definition) throws Exception {
- return new HystrixReifier(route, definition).createProcessor();
- }
-
-}
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixReifier.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixReifier.java
deleted file mode 100644
index 979cf70de02..00000000000
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixReifier.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Optional;
-
-import com.netflix.hystrix.HystrixCommand;
-import com.netflix.hystrix.HystrixCommandGroupKey;
-import com.netflix.hystrix.HystrixCommandKey;
-import com.netflix.hystrix.HystrixCommandProperties;
-import com.netflix.hystrix.HystrixThreadPoolKey;
-import com.netflix.hystrix.HystrixThreadPoolProperties;
-import org.apache.camel.ExtendedCamelContext;
-import org.apache.camel.Processor;
-import org.apache.camel.Route;
-import org.apache.camel.model.CircuitBreakerDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
-import org.apache.camel.model.Model;
-import org.apache.camel.reifier.ProcessorReifier;
-import org.apache.camel.spi.BeanIntrospection;
-import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
-import org.apache.camel.spi.PropertyConfigurer;
-import org.apache.camel.support.PropertyBindingSupport;
-import org.apache.camel.util.function.Suppliers;
-
-public class HystrixReifier extends ProcessorReifier<CircuitBreakerDefinition> {
-
- public HystrixReifier(Route route, CircuitBreakerDefinition definition) {
- super(route, definition);
- }
-
- @Override
- public Processor createProcessor() throws Exception {
- // create the regular and fallback processors
- Processor processor = createChildProcessor(true);
- Processor fallback = null;
- if (definition.getOnFallback() != null) {
- fallback = createProcessor(definition.getOnFallback());
- }
-
- final HystrixConfigurationDefinition config = buildHystrixConfiguration();
- final String id = getId(definition);
-
- // group and thread pool keys to use they can be configured on configRef and config, so look there first, and if none then use default
- String groupKey = config.getGroupKey();
- String threadPoolKey = config.getThreadPoolKey();
-
- if (groupKey == null) {
- groupKey = HystrixConfigurationDefinition.DEFAULT_GROUP_KEY;
- }
- if (threadPoolKey == null) {
- // by default use the thread pool from the group
- threadPoolKey = groupKey;
- }
-
- // use the node id as the command key
- HystrixCommandKey hcCommandKey = HystrixCommandKey.Factory.asKey(id);
- HystrixCommandKey hcFallbackCommandKey = HystrixCommandKey.Factory.asKey(id + "-fallback");
-
- // use the configured group key
- HystrixCommandGroupKey hcGroupKey = HystrixCommandGroupKey.Factory.asKey(groupKey);
- HystrixThreadPoolKey tpKey = HystrixThreadPoolKey.Factory.asKey(threadPoolKey);
-
- // create setter using the default options
- HystrixCommand.Setter setter = HystrixCommand.Setter.withGroupKey(hcGroupKey)
- .andCommandKey(hcCommandKey)
- .andThreadPoolKey(tpKey);
-
- HystrixCommandProperties.Setter commandSetter = HystrixCommandProperties.Setter();
- setter.andCommandPropertiesDefaults(commandSetter);
-
- HystrixThreadPoolProperties.Setter threadPoolSetter = HystrixThreadPoolProperties.Setter();
- setter.andThreadPoolPropertiesDefaults(threadPoolSetter);
-
- configureHystrix(commandSetter, threadPoolSetter, config);
-
- // create setter for fallback via network
- HystrixCommand.Setter fallbackSetter = null;
- boolean fallbackViaNetwork
- = definition.getOnFallback() != null && parseBoolean(definition.getOnFallback().getFallbackViaNetwork(), false);
- if (fallbackViaNetwork) {
- // use a different thread pool that is for fallback (should never use the same thread pool as the regular command)
- HystrixThreadPoolKey tpFallbackKey = HystrixThreadPoolKey.Factory.asKey(threadPoolKey + "-fallback");
-
- fallbackSetter = HystrixCommand.Setter.withGroupKey(hcGroupKey)
- .andCommandKey(hcFallbackCommandKey)
- .andThreadPoolKey(tpFallbackKey);
-
- HystrixCommandProperties.Setter commandFallbackSetter = HystrixCommandProperties.Setter();
- fallbackSetter.andCommandPropertiesDefaults(commandFallbackSetter);
-
- HystrixThreadPoolProperties.Setter fallbackThreadPoolSetter = HystrixThreadPoolProperties.Setter();
- fallbackSetter.andThreadPoolPropertiesDefaults(fallbackThreadPoolSetter);
-
- // at first configure any shared options
- configureHystrix(commandFallbackSetter, fallbackThreadPoolSetter, config);
- }
-
- return new HystrixProcessor(
- hcGroupKey, hcCommandKey, hcFallbackCommandKey, setter, fallbackSetter, processor, fallback,
- fallbackViaNetwork);
- }
-
- private void configureHystrix(
- HystrixCommandProperties.Setter command, HystrixThreadPoolProperties.Setter threadPool,
- HystrixConfigurationDefinition config) {
- // command
- if (config.getCircuitBreakerEnabled() != null) {
- command.withCircuitBreakerEnabled(parseBoolean(config.getCircuitBreakerEnabled()));
- }
- if (config.getCircuitBreakerErrorThresholdPercentage() != null) {
- command.withCircuitBreakerErrorThresholdPercentage(parseInt(config.getCircuitBreakerErrorThresholdPercentage()));
- }
- if (config.getCircuitBreakerForceClosed() != null) {
- command.withCircuitBreakerForceClosed(parseBoolean(config.getCircuitBreakerForceClosed()));
- }
- if (config.getCircuitBreakerForceOpen() != null) {
- command.withCircuitBreakerForceOpen(parseBoolean(config.getCircuitBreakerForceOpen()));
- }
- if (config.getCircuitBreakerRequestVolumeThreshold() != null) {
- command.withCircuitBreakerRequestVolumeThreshold(parseInt(config.getCircuitBreakerRequestVolumeThreshold()));
- }
- if (config.getCircuitBreakerSleepWindowInMilliseconds() != null) {
- command.withCircuitBreakerSleepWindowInMilliseconds(parseInt(config.getCircuitBreakerSleepWindowInMilliseconds()));
- }
- if (config.getExecutionIsolationSemaphoreMaxConcurrentRequests() != null) {
- command.withExecutionIsolationSemaphoreMaxConcurrentRequests(
- parseInt(config.getExecutionIsolationSemaphoreMaxConcurrentRequests()));
- }
- if (config.getExecutionIsolationStrategy() != null) {
- command.withExecutionIsolationStrategy(
- parse(HystrixCommandProperties.ExecutionIsolationStrategy.class, config.getExecutionIsolationStrategy()));
- }
- if (config.getExecutionIsolationThreadInterruptOnTimeout() != null) {
- command.withExecutionIsolationThreadInterruptOnTimeout(
- parseBoolean(config.getExecutionIsolationThreadInterruptOnTimeout()));
- }
- if (config.getExecutionTimeoutInMilliseconds() != null) {
- command.withExecutionTimeoutInMilliseconds(parseInt(config.getExecutionTimeoutInMilliseconds()));
- }
- if (config.getExecutionTimeoutEnabled() != null) {
- command.withExecutionTimeoutEnabled(parseBoolean(config.getExecutionTimeoutEnabled()));
- }
- if (config.getFallbackIsolationSemaphoreMaxConcurrentRequests() != null) {
- command.withFallbackIsolationSemaphoreMaxConcurrentRequests(
- parseInt(config.getFallbackIsolationSemaphoreMaxConcurrentRequests()));
- }
- if (config.getFallbackEnabled() != null) {
- command.withFallbackEnabled(parseBoolean(config.getFallbackEnabled()));
- }
- if (config.getMetricsHealthSnapshotIntervalInMilliseconds() != null) {
- command.withMetricsHealthSnapshotIntervalInMilliseconds(
- parseInt(config.getMetricsHealthSnapshotIntervalInMilliseconds()));
- }
- if (config.getMetricsRollingPercentileBucketSize() != null) {
- command.withMetricsRollingPercentileBucketSize(parseInt(config.getMetricsRollingPercentileBucketSize()));
- }
- if (config.getMetricsRollingPercentileEnabled() != null) {
- command.withMetricsRollingPercentileEnabled(parseBoolean(config.getMetricsRollingPercentileEnabled()));
- }
- if (config.getMetricsRollingPercentileWindowInMilliseconds() != null) {
- command.withMetricsRollingPercentileWindowInMilliseconds(
- parseInt(config.getMetricsRollingPercentileWindowInMilliseconds()));
- }
- if (config.getMetricsRollingPercentileWindowBuckets() != null) {
- command.withMetricsRollingPercentileWindowBuckets(parseInt(config.getMetricsRollingPercentileWindowBuckets()));
- }
- if (config.getMetricsRollingStatisticalWindowInMilliseconds() != null) {
- command.withMetricsRollingStatisticalWindowInMilliseconds(
- parseInt(config.getMetricsRollingStatisticalWindowInMilliseconds()));
- }
- if (config.getMetricsRollingStatisticalWindowBuckets() != null) {
- command.withMetricsRollingStatisticalWindowBuckets(parseInt(config.getMetricsRollingStatisticalWindowBuckets()));
- }
- if (config.getRequestLogEnabled() != null) {
- command.withRequestLogEnabled(parseBoolean(config.getRequestLogEnabled()));
- }
- if (config.getCorePoolSize() != null) {
- threadPool.withCoreSize(parseInt(config.getCorePoolSize()));
- }
- if (config.getMaximumSize() != null) {
- threadPool.withMaximumSize(parseInt(config.getMaximumSize()));
- }
- if (config.getKeepAliveTime() != null) {
- threadPool.withKeepAliveTimeMinutes(parseInt(config.getKeepAliveTime()));
- }
- if (config.getMaxQueueSize() != null) {
- threadPool.withMaxQueueSize(parseInt(config.getMaxQueueSize()));
- }
- if (config.getQueueSizeRejectionThreshold() != null) {
- threadPool.withQueueSizeRejectionThreshold(parseInt(config.getQueueSizeRejectionThreshold()));
- }
- if (config.getThreadPoolRollingNumberStatisticalWindowInMilliseconds() != null) {
- threadPool.withMetricsRollingStatisticalWindowInMilliseconds(
- parseInt(config.getThreadPoolRollingNumberStatisticalWindowInMilliseconds()));
- }
- if (config.getThreadPoolRollingNumberStatisticalWindowBuckets() != null) {
- threadPool.withMetricsRollingStatisticalWindowBuckets(
- parseInt(config.getThreadPoolRollingNumberStatisticalWindowBuckets()));
- }
- if (config.getAllowMaximumSizeToDivergeFromCoreSize() != null) {
- threadPool
- .withAllowMaximumSizeToDivergeFromCoreSize(parseBoolean(config.getAllowMaximumSizeToDivergeFromCoreSize()));
- }
- }
-
- // *******************************
- // Helpers
- // *******************************
-
- HystrixConfigurationDefinition buildHystrixConfiguration() throws Exception {
- Map<String, Object> properties = new HashMap<>();
-
- final PropertyConfigurer configurer = camelContext.adapt(ExtendedCamelContext.class)
- .getConfigurerResolver()
- .resolvePropertyConfigurer(HystrixConfigurationDefinition.class.getName(), camelContext);
-
- // Extract properties from default configuration, the one configured on
- // camel context takes the precedence over those in the registry
- loadProperties(properties, Suppliers.firstNotNull(
- () -> camelContext.getExtension(Model.class).getHystrixConfiguration(null),
- () -> lookupByNameAndType(HystrixConstants.DEFAULT_HYSTRIX_CONFIGURATION_ID,
- HystrixConfigurationDefinition.class)),
- configurer);
-
- // Extract properties from referenced configuration, the one configured
- // on camel context takes the precedence over those in the registry
- if (definition.getConfiguration() != null) {
- final String ref = parseString(definition.getConfiguration());
-
- loadProperties(properties, Suppliers.firstNotNull(
- () -> camelContext.getExtension(Model.class).getHystrixConfiguration(ref),
- () -> mandatoryLookup(ref, HystrixConfigurationDefinition.class)),
- configurer);
- }
-
- // Extract properties from local configuration
- loadProperties(properties, Optional.ofNullable(definition.getHystrixConfiguration()), configurer);
-
- // Apply properties to a new configuration
- HystrixConfigurationDefinition config = new HystrixConfigurationDefinition();
- PropertyBindingSupport.build()
- .withCamelContext(camelContext)
- .withConfigurer(configurer)
- .withProperties(properties)
- .withTarget(config)
- .bind();
-
- return config;
- }
-
- private void loadProperties(Map<String, Object> properties, Optional<?> optional, PropertyConfigurer configurer) {
- BeanIntrospection beanIntrospection = camelContext.adapt(ExtendedCamelContext.class).getBeanIntrospection();
- optional.ifPresent(bean -> {
- if (configurer instanceof ExtendedPropertyConfigurerGetter) {
- ExtendedPropertyConfigurerGetter getter = (ExtendedPropertyConfigurerGetter) configurer;
- Map<String, Object> types = getter.getAllOptions(bean);
- types.forEach((k, t) -> {
- Object value = getter.getOptionValue(bean, k, true);
- if (value != null) {
- properties.put(k, value);
- }
- });
- } else {
- // no configurer found so use bean introspection (reflection)
- beanIntrospection.getProperties(bean, properties, null, false);
- }
- });
- }
-
-}
diff --git a/components/camel-hystrix/src/main/resources/META-INF/services/org/apache/camel/model/CircuitBreakerDefinition b/components/camel-hystrix/src/main/resources/META-INF/services/org/apache/camel/model/CircuitBreakerDefinition
deleted file mode 100644
index 868615a1d40..00000000000
--- a/components/camel-hystrix/src/main/resources/META-INF/services/org/apache/camel/model/CircuitBreakerDefinition
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class=org.apache.camel.component.hystrix.processor.HystrixProcessorFactory
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixBadRequestExceptionTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixBadRequestExceptionTest.java
deleted file mode 100644
index 56c1d55c786..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixBadRequestExceptionTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import com.netflix.hystrix.exception.HystrixBadRequestException;
-import org.apache.camel.Exchange;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spi.CircuitBreakerConstants;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class HystrixBadRequestExceptionTest extends CamelTestSupport {
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:fallback").expectedMessageCount(0);
- getMockEndpoint("mock:result").expectedMessageCount(0);
-
- Exchange out = template.send("direct:start", e -> e.getMessage().setBody("Hello World"));
- assertTrue(out.isFailed());
- assertFalse(out.getProperty(CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION, boolean.class));
- assertFalse(out.getProperty(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK, boolean.class));
- assertTrue(out.getException() instanceof HystrixBadRequestException);
-
- assertMockEndpointsSatisfied();
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:start")
- .to("log:start")
- .circuitBreaker()
- .throwException(new HystrixBadRequestException("Should not fallback"))
- .onFallback()
- .to("mock:fallback")
- .transform().constant("Fallback message")
- .end()
- .to("log:result")
- .to("mock:result");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixCircuitOpenTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixCircuitOpenTest.java
deleted file mode 100644
index eb0d7639be1..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixCircuitOpenTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import java.io.IOException;
-
-import org.apache.camel.CamelExecutionException;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spi.CircuitBreakerConstants;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Disabled("Flaky test")
-public class HystrixCircuitOpenTest extends CamelTestSupport {
- public static final Integer REQUEST_VOLUME_THRESHOLD = 4;
- private static final Logger LOG = LoggerFactory.getLogger(HystrixCircuitOpenTest.class);
-
- private HystrixExceptionRoute route = new HystrixExceptionRoute();
-
- @Test
- public void testCircuitOpen() throws Exception {
- LOG.info("testCircuitOpen start");
- // failing requests
- route.throwException = true;
- for (int i = 0; i < 2 * REQUEST_VOLUME_THRESHOLD; i++) {
- try {
- template.asyncRequestBody("direct:start", "Request Body");
- } catch (CamelExecutionException e) {
- LOG.info(e.toString());
- }
- }
- Thread.sleep(1500);
-
- resetMocks();
-
- // notice this can be flaky due timing when using thread sleeps in unit tests
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_SHORT_CIRCUITED, true);
-
- route.throwException = false;
- try {
- template.requestBody("direct:start", "Request Body");
- LOG.info("Instead circuit open expected");
- } catch (CamelExecutionException e) {
- LOG.info("Circuit open expected ", e);
- }
-
- assertMockEndpointsSatisfied();
-
- // wait for the circuit to try an other request
- Thread.sleep(500);
- for (int i = 0; i < 2 * REQUEST_VOLUME_THRESHOLD; i++) {
- try {
- template.requestBody("direct:start", "Request Body");
- LOG.info("Circuit has closed");
- } catch (CamelExecutionException e) {
- Thread.sleep(i * 100);
- LOG.info("Circuit will be closed soon " + e.toString());
- }
- }
-
- resetMocks();
-
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_SHORT_CIRCUITED, false);
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION, true);
-
- template.requestBody("direct:start", "Request Body");
-
- assertMockEndpointsSatisfied();
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() throws Exception {
- return route;
- }
-
- class HystrixExceptionRoute extends RouteBuilder {
- volatile boolean throwException = true;
-
- @Override
- public void configure() throws Exception {
- from("direct:start")
- .circuitBreaker()
- .hystrixConfiguration()
- .executionTimeoutInMilliseconds(100)
- .circuitBreakerRequestVolumeThreshold(REQUEST_VOLUME_THRESHOLD)
- .metricsRollingStatisticalWindowInMilliseconds(1000)
- .circuitBreakerSleepWindowInMilliseconds(2000)
- .end()
- .log("Hystrix processing start: ${threadName}")
- .process(new Processor() {
- @Override
- public void process(Exchange exchange) throws Exception {
- if (throwException) {
- LOG.info("Will throw exception");
- throw new IOException("Route has failed");
- } else {
- LOG.info("Will NOT throw exception");
- }
- }
- })
- .log("Hystrix processing end: ${threadName}")
- .end()
- .log(CircuitBreakerConstants.RESPONSE_SHORT_CIRCUITED + " = ${exchangeProperty."
- + CircuitBreakerConstants.RESPONSE_SHORT_CIRCUITED + "}")
- .to("mock:result");
- }
- }
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixHierarchicalConfigTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixHierarchicalConfigTest.java
deleted file mode 100644
index 0aee584deea..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixHierarchicalConfigTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Route;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.impl.engine.DefaultRoute;
-import org.apache.camel.model.CircuitBreakerDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
-import org.apache.camel.model.Model;
-import org.apache.camel.support.SimpleRegistry;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class HystrixHierarchicalConfigTest {
-
- @Test
- public void testRegistryConfiguration() throws Exception {
- final SimpleRegistry registry = new SimpleRegistry();
- final CamelContext context = new DefaultCamelContext(registry);
- final Route route = new DefaultRoute(context, null, null, null, null, null);
-
- HystrixConfigurationDefinition def = new HystrixConfigurationDefinition();
- def.setGroupKey("global-group-key");
- def.setThreadPoolKey("global-thread-key");
- def.corePoolSize(10);
-
- HystrixConfigurationDefinition ref = new HystrixConfigurationDefinition();
- ref.setGroupKey("ref-group-key");
- ref.corePoolSize(5);
-
- registry.bind(HystrixConstants.DEFAULT_HYSTRIX_CONFIGURATION_ID, def);
- registry.bind("ref-hystrix", ref);
-
- final HystrixReifier reifier = new HystrixReifier(
- route,
- new CircuitBreakerDefinition()
- .configuration("ref-hystrix")
- .hystrixConfiguration()
- .groupKey("local-conf-group-key")
- .requestLogEnabled(false)
- .end());
- final HystrixConfigurationDefinition config = reifier.buildHystrixConfiguration();
-
- assertEquals("local-conf-group-key", config.getGroupKey());
- assertEquals("global-thread-key", config.getThreadPoolKey());
- assertEquals(Integer.toString(5), config.getCorePoolSize());
- }
-
- @Test
- public void testContextConfiguration() throws Exception {
- final CamelContext context = new DefaultCamelContext();
- final Route route = new DefaultRoute(context, null, null, null, null, null);
-
- HystrixConfigurationDefinition def = new HystrixConfigurationDefinition();
- def.setGroupKey("global-group-key");
- def.setThreadPoolKey("global-thread-key");
- def.corePoolSize(10);
-
- HystrixConfigurationDefinition ref = new HystrixConfigurationDefinition();
- ref.setGroupKey("ref-group-key");
- ref.corePoolSize(5);
-
- context.getExtension(Model.class).setHystrixConfiguration(def);
- context.getExtension(Model.class).addHystrixConfiguration("ref-hystrix", ref);
-
- final HystrixReifier reifier = new HystrixReifier(
- route,
- new CircuitBreakerDefinition()
- .configuration("ref-hystrix")
- .hystrixConfiguration()
- .groupKey("local-conf-group-key")
- .requestLogEnabled(false)
- .end());
- final HystrixConfigurationDefinition config = reifier.buildHystrixConfiguration();
-
- assertEquals("local-conf-group-key", config.getGroupKey());
- assertEquals("global-thread-key", config.getThreadPoolKey());
- assertEquals(Integer.toString(5), config.getCorePoolSize());
- }
-
- @Test
- public void testMixedConfiguration() throws Exception {
- final SimpleRegistry registry = new SimpleRegistry();
- final CamelContext context = new DefaultCamelContext(registry);
- final Route route = new DefaultRoute(context, null, null, null, null, null);
-
- HystrixConfigurationDefinition def = new HystrixConfigurationDefinition();
- def.setGroupKey("global-group-key");
- def.setThreadPoolKey("global-thread-key");
- def.corePoolSize(10);
-
- HystrixConfigurationDefinition ref = new HystrixConfigurationDefinition();
- ref.setGroupKey("ref-group-key");
- ref.corePoolSize(5);
-
- // this should be ignored
- HystrixConfigurationDefinition defReg = new HystrixConfigurationDefinition();
- defReg.setGroupKey("global-reg-group-key");
- defReg.setThreadPoolKey("global-reg-thread-key");
- defReg.corePoolSize(20);
-
- context.getExtension(Model.class).setHystrixConfiguration(def);
-
- registry.bind(HystrixConstants.DEFAULT_HYSTRIX_CONFIGURATION_ID, defReg);
- registry.bind("ref-hystrix", ref);
-
- final HystrixReifier reifier = new HystrixReifier(
- route,
- new CircuitBreakerDefinition()
- .configuration("ref-hystrix")
- .hystrixConfiguration()
- .groupKey("local-conf-group-key")
- .requestLogEnabled(false)
- .end());
- final HystrixConfigurationDefinition config = reifier.buildHystrixConfiguration();
-
- assertEquals("local-conf-group-key", config.getGroupKey());
- assertEquals("global-thread-key", config.getThreadPoolKey());
- assertEquals(Integer.toString(5), config.getCorePoolSize());
- }
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixInheritErrorHandlerTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixInheritErrorHandlerTest.java
deleted file mode 100644
index 5e6027e0a51..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixInheritErrorHandlerTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-public class HystrixInheritErrorHandlerTest extends CamelTestSupport {
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:a").expectedMessageCount(3 + 1);
- getMockEndpoint("mock:dead").expectedMessageCount(1);
- getMockEndpoint("mock:result").expectedMessageCount(0);
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- errorHandler(deadLetterChannel("mock:dead").maximumRedeliveries(3).redeliveryDelay(0));
-
- from("direct:start")
- .to("log:start")
- // turn on Camel's error handler on hystrix so it can do redeliveries
- .circuitBreaker().inheritErrorHandler(true)
- .to("mock:a")
- .throwException(new IllegalArgumentException("Forced"))
- .end()
- .to("log:result")
- .to("mock:result");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixManagementTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixManagementTest.java
deleted file mode 100644
index f05a5779bc6..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixManagementTest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import java.util.stream.Stream;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.hystrix.metrics.HystrixEventStreamService;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class HystrixManagementTest extends CamelTestSupport {
-
- private static final Logger LOG = LoggerFactory.getLogger(HystrixManagementTest.class);
-
- private HystrixEventStreamService stream = new HystrixEventStreamService();
-
- @Override
- protected boolean useJmx() {
- return true;
- }
-
- protected MBeanServer getMBeanServer() {
- return context.getManagementStrategy().getManagementAgent().getMBeanServer();
- }
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
-
- // look inside jmx
- // get the stats for the route
- MBeanServer mbeanServer = getMBeanServer();
-
- // context name
- String name = context.getManagementName();
-
- // get the object name for the delayer
- ObjectName on = ObjectName.getInstance("org.apache.camel:context=" + name + ",type=processors,name=\"myHystrix\"");
-
- // should be on start
- String routeId = (String) mbeanServer.getAttribute(on, "RouteId");
- assertEquals("start", routeId);
-
- // should be id of the node
- String commandKey = (String) mbeanServer.getAttribute(on, "HystrixCommandKey");
- assertEquals("myHystrix", commandKey);
-
- String groupKey = (String) mbeanServer.getAttribute(on, "HystrixGroupKey");
- assertEquals("CamelHystrix", groupKey);
-
- // these metrics need a little time before updating
- Thread.sleep(1000);
-
- Long totalRequests = (Long) mbeanServer.getAttribute(on, "HystrixTotalRequests");
- assertEquals(1, totalRequests.longValue());
-
- Long errorCount = (Long) mbeanServer.getAttribute(on, "HystrixErrorCount");
- assertEquals(0, errorCount.longValue());
-
- Boolean open = (Boolean) mbeanServer.getAttribute(on, "CircuitBreakerOpen");
- assertEquals(false, open.booleanValue());
-
- // let it gather for a while
- Thread.sleep(1000);
-
- String latest = stream.oldestMetricsAsJSon();
- LOG.info("Oldest json stream: {}", latest);
-
- Stream<String> jsons = stream.streamMetrics();
- jsons.forEach(s -> {
- LOG.info("JSon: {}", s);
- });
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- // add the stream
- stream.setQueueSize(10);
- stream.setDelay(100);
- context.addService(stream);
-
- from("direct:start").routeId("start")
- .circuitBreaker().id("myHystrix")
- .to("direct:foo")
- .onFallback()
- .transform().constant("Fallback message")
- .end()
- .to("mock:result");
-
- from("direct:foo")
- .transform().constant("Bye World");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteConfigMaximumSizeTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteConfigMaximumSizeTest.java
deleted file mode 100644
index 5d0a75298c4..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteConfigMaximumSizeTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.model.CircuitBreakerDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
-import org.apache.camel.model.RouteDefinition;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class HystrixRouteConfigMaximumSizeTest extends CamelTestSupport {
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
- @Test
- public void testGroupKeyAndThreadPoolKeyConfigFlagsDoNotScrapHystrixConfiguration() throws Exception {
- // dummy route
- RouteBuilder rb = new RouteBuilder(context) {
- @Override
- public void configure() throws Exception {
- from("direct:foo")
- .circuitBreaker()
- .hystrixConfiguration().groupKey("test2").metricsHealthSnapshotIntervalInMilliseconds(99999).end()
- .to("log:hello")
- .end();
-
- }
- };
-
- rb.configure();
-
- RouteDefinition route = rb.getRouteCollection().getRoutes().get(0);
- assertEquals(CircuitBreakerDefinition.class, route.getOutputs().get(0).getClass());
-
- HystrixConfigurationDefinition config
- = ((CircuitBreakerDefinition) route.getOutputs().get(0)).getHystrixConfiguration();
- assertEquals("test2", config.getGroupKey());
- assertEquals(Integer.toString(99999), config.getMetricsHealthSnapshotIntervalInMilliseconds());
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:start")
- .circuitBreaker()
- .hystrixConfiguration().groupKey("myCamelApp").requestLogEnabled(false).corePoolSize(5)
- .maximumSize(15).allowMaximumSizeToDivergeFromCoreSize(true)
- .end()
- .to("direct:foo")
- .onFallback()
- .transform().constant("Fallback message")
- .end()
- .to("mock:result");
-
- from("direct:foo")
- .transform().constant("Bye World");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteConfigTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteConfigTest.java
deleted file mode 100644
index 502f78ce43e..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteConfigTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.model.CircuitBreakerDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
-import org.apache.camel.model.RouteDefinition;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class HystrixRouteConfigTest extends CamelTestSupport {
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
- @Test
- public void testGroupKeyAndThreadPoolKeyConfigFlagsDoNotScrapHystrixConfiguration() throws Exception {
- // dummy route
- RouteBuilder rb = new RouteBuilder(context) {
- @Override
- public void configure() throws Exception {
- from("direct:foo")
- .circuitBreaker()
- .hystrixConfiguration().groupKey("test2").metricsHealthSnapshotIntervalInMilliseconds(99999).end()
- .to("log:hello")
- .end();
-
- }
- };
-
- rb.configure();
-
- RouteDefinition route = rb.getRouteCollection().getRoutes().get(0);
- assertEquals(CircuitBreakerDefinition.class, route.getOutputs().get(0).getClass());
-
- HystrixConfigurationDefinition config
- = ((CircuitBreakerDefinition) route.getOutputs().get(0)).getHystrixConfiguration();
- assertEquals("test2", config.getGroupKey());
- assertEquals(Integer.toString(99999), config.getMetricsHealthSnapshotIntervalInMilliseconds());
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:start")
- .circuitBreaker()
- .hystrixConfiguration().groupKey("myCamelApp").requestLogEnabled(false).corePoolSize(5).end()
- .to("direct:foo")
- .onFallback()
- .transform().constant("Fallback message")
- .end()
- .to("mock:result");
-
- from("direct:foo")
- .transform().constant("Bye World");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteFallbackTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteFallbackTest.java
deleted file mode 100644
index c7842565d12..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteFallbackTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spi.CircuitBreakerConstants;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-public class HystrixRouteFallbackTest extends CamelTestSupport {
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Fallback message");
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION, false);
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK, true);
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:start")
- .to("log:start")
- .circuitBreaker()
- .throwException(new IllegalArgumentException("Forced"))
- .onFallback()
- .transform().constant("Fallback message")
- .end()
- .to("log:result")
- .to("mock:result");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteFallbackViaNetworkTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteFallbackViaNetworkTest.java
deleted file mode 100644
index bd641e47f55..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteFallbackViaNetworkTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spi.CircuitBreakerConstants;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-public class HystrixRouteFallbackViaNetworkTest extends CamelTestSupport {
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Fallback message");
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION, false);
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK, true);
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:start")
- .to("log:start")
- .circuitBreaker()
- .throwException(new IllegalArgumentException("Forced"))
- .onFallbackViaNetwork()
- .transform().constant("Fallback message")
- .end()
- .to("log:result")
- .to("mock:result");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteOkTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteOkTest.java
deleted file mode 100644
index 13c3705f0f6..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteOkTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ExtendedCamelContext;
-import org.apache.camel.LoggingLevel;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spi.BeanIntrospection;
-import org.apache.camel.spi.CircuitBreakerConstants;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class HystrixRouteOkTest extends CamelTestSupport {
-
- private BeanIntrospection bi;
-
- @Override
- protected boolean useJmx() {
- return false;
- }
-
- @Override
- protected CamelContext createCamelContext() throws Exception {
- CamelContext context = super.createCamelContext();
-
- bi = context.adapt(ExtendedCamelContext.class).getBeanIntrospection();
- bi.setLoggingLevel(LoggingLevel.INFO);
- bi.resetCounters();
-
- return context;
- }
-
- @Test
- public void testHystrix() throws Exception {
- assertEquals(0, bi.getInvokedCounter());
-
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION, true);
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK, false);
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
-
- assertEquals(0, bi.getInvokedCounter());
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:start")
- .circuitBreaker()
- .to("direct:foo")
- .to("log:foo")
- .onFallback()
- .transform().constant("Fallback message")
- .end()
- .to("log:result")
- .to("mock:result");
-
- from("direct:foo")
- .transform().constant("Bye World");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixTimeoutTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixTimeoutTest.java
deleted file mode 100644
index 08ff9b3c029..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixTimeoutTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import java.util.concurrent.TimeoutException;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.fail;
-
-/**
- * Hystrix using timeout with Java DSL
- */
-public class HystrixTimeoutTest extends CamelTestSupport {
-
- private static final Logger LOG = LoggerFactory.getLogger(HystrixManagementTest.class);
-
- @Test
- public void testFast() throws Exception {
- // this calls the fast route and therefore we get a response
- Object out = template.requestBody("direct:start", "fast");
- assertEquals("Fast response", out);
- }
-
- @Test
- public void testSlow() throws Exception {
- // this calls the slow route and therefore causes a timeout which triggers an exception
- try {
- template.requestBody("direct:start", "slow");
- fail("Should fail due to timeout");
- } catch (Exception e) {
- // expected a timeout
- assertIsInstanceOf(TimeoutException.class, e.getCause().getCause());
- }
- }
-
- @Test
- public void testSlowLoop() throws Exception {
- // this calls the slow route and therefore causes a timeout which triggers an exception
- for (int i = 0; i < 10; i++) {
- try {
- LOG.info(">>> test run " + i + " <<<");
- template.requestBody("direct:start", "slow");
- fail("Should fail due to timeout");
- } catch (Exception e) {
- // expected a timeout
- assertIsInstanceOf(TimeoutException.class, e.getCause().getCause());
- }
- }
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:start")
- .circuitBreaker()
- // use 2 second timeout
- .hystrixConfiguration().executionTimeoutInMilliseconds(2000).end()
- .log("Hystrix processing start: ${threadName}")
- .toD("direct:${body}")
- .log("Hystrix processing end: ${threadName}")
- .end()
- .log("After Hystrix ${body}");
-
- from("direct:fast")
- // this is a fast route and takes 1 second to respond
- .log("Fast processing start: ${threadName}")
- .delay(1000)
- .transform().constant("Fast response")
- .log("Fast processing end: ${threadName}");
-
- from("direct:slow")
- // this is a slow route and takes 3 second to respond
- .log("Slow processing start: ${threadName}")
- .delay(3000)
- .transform().constant("Slow response")
- .log("Slow processing end: ${threadName}");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixTimeoutWithFallbackTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixTimeoutWithFallbackTest.java
deleted file mode 100644
index e5c99517c0d..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixTimeoutWithFallbackTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-/**
- * Hystrix using timeout and fallback with Java DSL
- */
-public class HystrixTimeoutWithFallbackTest extends CamelTestSupport {
-
- @Test
- public void testFast() throws Exception {
- // this calls the fast route and therefore we get a response
- Object out = template.requestBody("direct:start", "fast");
- assertEquals("LAST CHANGE", out);
- }
-
- @Test
- public void testSlow() throws Exception {
- // this calls the slow route and therefore causes a timeout which triggers the fallback
- Object out = template.requestBody("direct:start", "slow");
- assertEquals("LAST CHANGE", out);
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:start")
- .circuitBreaker()
- // use 2 second timeout
- .hystrixConfiguration().executionTimeoutInMilliseconds(2000).end()
- .log("Hystrix processing start: ${threadName}")
- .toD("direct:${body}")
- .log("Hystrix processing end: ${threadName}")
- .onFallback()
- // use fallback if there was an exception or timeout
- .log("Hystrix fallback start: ${threadName}")
- .transform().constant("Fallback response")
- .log("Hystrix fallback end: ${threadName}")
- .end()
- .log("After Hystrix ${body}")
- .transform(simple("A CHANGE"))
- .transform(simple("LAST CHANGE"))
- .log("End ${body}");
-
- from("direct:fast")
- // this is a fast route and takes 1 second to respond
- .log("Fast processing start: ${threadName}")
- .delay(1000)
- .transform().constant("Fast response")
- .log("Fast processing end: ${threadName}");
-
- from("direct:slow")
- // this is a slow route and takes 3 second to respond
- .log("Slow processing start: ${threadName}")
- .delay(3000)
- .transform().constant("Slow response")
- .log("Slow processing end: ${threadName}");
- }
- };
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigMaximumSizeTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigMaximumSizeTest.java
deleted file mode 100644
index 4f6d70f6ea9..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigMaximumSizeTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.test.annotation.DirtiesContext;
-
-@DirtiesContext
-public class SpringHystrixRouteConfigMaximumSizeTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext(
- "org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigMaximumSizeTest.xml");
- }
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigRefTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigRefTest.java
deleted file mode 100644
index 380bbf75bce..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigRefTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.test.annotation.DirtiesContext;
-
-@DirtiesContext
-public class SpringHystrixRouteConfigRefTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext(
- "org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigRefTest.xml");
- }
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigTest.java
deleted file mode 100644
index 3f883f32240..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.test.annotation.DirtiesContext;
-
-@DirtiesContext
-public class SpringHystrixRouteConfigTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext(
- "org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigTest.xml");
- }
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteFallbackTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteFallbackTest.java
deleted file mode 100644
index 754ff2698b7..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteFallbackTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.spi.CircuitBreakerConstants;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.test.annotation.DirtiesContext;
-
-@DirtiesContext
-public class SpringHystrixRouteFallbackTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext(
- "org/apache/camel/component/hystrix/processor/SpringHystrixRouteFallbackTest.xml");
- }
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Fallback message");
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION, false);
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK, true);
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteHierarchicalConfigTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteHierarchicalConfigTest.java
deleted file mode 100644
index 003d6f9d849..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteHierarchicalConfigTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.ExtendedCamelContext;
-import org.apache.camel.Route;
-import org.apache.camel.impl.engine.DefaultRoute;
-import org.apache.camel.model.CircuitBreakerDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
-import org.apache.camel.model.RouteDefinition;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.test.annotation.DirtiesContext;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-@DirtiesContext
-public class SpringHystrixRouteHierarchicalConfigTest extends CamelSpringTestSupport {
- @Override
- protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext(
- "org/apache/camel/component/hystrix/processor/SpringHystrixRouteHierarchicalConfigTest.xml");
- }
-
- @Test
- public void testHystrix() throws Exception {
- RouteDefinition routeDefinition = context.getRouteDefinition("hystrix-route");
- final Route route = new DefaultRoute(
- context, routeDefinition,
- routeDefinition.idOrCreate(context.adapt(ExtendedCamelContext.class).getNodeIdFactory()), null, null, null);
- CircuitBreakerDefinition hystrixDefinition = findCircuitBreakerDefinition(routeDefinition);
-
- assertNotNull(hystrixDefinition);
-
- HystrixReifier reifier = new HystrixReifier(route, hystrixDefinition);
- HystrixConfigurationDefinition config = reifier.buildHystrixConfiguration();
-
- assertEquals("local-conf-group-key", config.getGroupKey());
- assertEquals("global-thread-key", config.getThreadPoolKey());
- assertEquals(Integer.toString(5), config.getCorePoolSize());
-
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
- // **********************************************
- // Helper
- // **********************************************
-
- private CircuitBreakerDefinition findCircuitBreakerDefinition(RouteDefinition routeDefinition) throws Exception {
- return routeDefinition.getOutputs().stream()
- .filter(CircuitBreakerDefinition.class::isInstance)
- .map(CircuitBreakerDefinition.class::cast)
- .findFirst()
- .orElseThrow(() -> new IllegalStateException("Unable to find a CircuitBreakerDefinition"));
- }
-}
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteOkTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteOkTest.java
deleted file mode 100644
index 04b0a629d7e..00000000000
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/SpringHystrixRouteOkTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.hystrix.processor;
-
-import org.apache.camel.spi.CircuitBreakerConstants;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.test.annotation.DirtiesContext;
-
-@DirtiesContext
-public class SpringHystrixRouteOkTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/component/hystrix/processor/SpringHystrixRouteOkTest.xml");
- }
-
- @Test
- public void testHystrix() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION, true);
- getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK, false);
-
- template.sendBody("direct:start", "Hello World");
-
- assertMockEndpointsSatisfied();
- }
-
-}
diff --git a/components/camel-hystrix/src/test/resources/log4j2.properties b/components/camel-hystrix/src/test/resources/log4j2.properties
deleted file mode 100644
index 0c12dfe3436..00000000000
--- a/components/camel-hystrix/src/test/resources/log4j2.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-appender.file.type = File
-appender.file.name = file
-appender.file.fileName = target/camel-hystrix-test.log
-appender.file.layout.type = PatternLayout
-appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.file.ref = file
diff --git a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigMaximumSizeTest.xml b/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigMaximumSizeTest.xml
deleted file mode 100644
index 4d0aa788df0..00000000000
--- a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigMaximumSizeTest.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:start"/>
- <circuitBreaker>
- <hystrixConfiguration groupKey="myCamelApp" requestLogEnabled="false" corePoolSize="5" maximumSize="15" allowMaximumSizeToDivergeFromCoreSize="true"/>
- <to uri="direct:foo"/>
- <onFallback>
- <transform>
- <constant>Fallback message</constant>
- </transform>
- </onFallback>
- </circuitBreaker>
- <to uri="mock:result"/>
- </route>
-
- <route>
- <from uri="direct:foo"/>
- <transform>
- <constant>Bye World</constant>
- </transform>
- </route>
- </camelContext>
-
-</beans>
\ No newline at end of file
diff --git a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigRefTest.xml b/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigRefTest.xml
deleted file mode 100644
index a6b0acbf64d..00000000000
--- a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigRefTest.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
-
- <hystrixConfiguration id="hysConfig" requestLogEnabled="false" corePoolSize="5"/>
-
- <route>
- <from uri="direct:start"/>
- <circuitBreaker configuration="hysConfig">
- <to uri="direct:foo"/>
- <onFallback>
- <transform>
- <constant>Fallback message</constant>
- </transform>
- </onFallback>
- </circuitBreaker>
- <to uri="mock:result"/>
- </route>
-
- <route>
- <from uri="direct:foo"/>
- <transform>
- <constant>Bye World</constant>
- </transform>
- </route>
- </camelContext>
-
-</beans>
\ No newline at end of file
diff --git a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigTest.xml b/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigTest.xml
deleted file mode 100644
index 2c8a9a6a9ed..00000000000
--- a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteConfigTest.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:start"/>
- <circuitBreaker>
- <hystrixConfiguration groupKey="myCamelApp" requestLogEnabled="false" corePoolSize="5"/>
- <to uri="direct:foo"/>
- <onFallback>
- <transform>
- <constant>Fallback message</constant>
- </transform>
- </onFallback>
- </circuitBreaker>
- <to uri="mock:result"/>
- </route>
-
- <route>
- <from uri="direct:foo"/>
- <transform>
- <constant>Bye World</constant>
- </transform>
- </route>
- </camelContext>
-
-</beans>
\ No newline at end of file
diff --git a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteFallbackTest.xml b/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteFallbackTest.xml
deleted file mode 100644
index 39dbe9737c9..00000000000
--- a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteFallbackTest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:start"/>
- <circuitBreaker>
- <throwException exceptionType="java.lang.IllegalArgumentException" message="Forced"/>
- <onFallback>
- <transform>
- <constant>Fallback message</constant>
- </transform>
- </onFallback>
- </circuitBreaker>
- <to uri="mock:result"/>
- </route>
-
- </camelContext>
-
-</beans>
\ No newline at end of file
diff --git a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteHierarchicalConfigTest.xml b/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteHierarchicalConfigTest.xml
deleted file mode 100644
index f406d1ddc67..00000000000
--- a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteHierarchicalConfigTest.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
-
- <defaultHystrixConfiguration id="global" groupKey="global-group-key" threadPoolKey="global-thread-key" corePoolSize="10"/>
- <hystrixConfiguration id="ref-hystrix" groupKey="ref-group-key" corePoolSize="5"/>
-
- <route id="hystrix-route">
- <from uri="direct:start"/>
- <circuitBreaker configuration="ref-hystrix">
- <hystrixConfiguration groupKey="local-conf-group-key" requestLogEnabled="false"/>
- <to uri="direct:foo"/>
- <onFallback>
- <transform>
- <constant>Fallback message</constant>
- </transform>
- </onFallback>
- </circuitBreaker>
- <to uri="mock:result"/>
- </route>
-
- <route>
- <from uri="direct:foo"/>
- <transform>
- <constant>Bye World</constant>
- </transform>
- </route>
- </camelContext>
-
-</beans>
\ No newline at end of file
diff --git a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteOkTest.xml b/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteOkTest.xml
deleted file mode 100644
index 1e2b139c239..00000000000
--- a/components/camel-hystrix/src/test/resources/org/apache/camel/component/hystrix/processor/SpringHystrixRouteOkTest.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:start"/>
- <circuitBreaker>
- <to uri="direct:foo"/>
- <onFallback>
- <transform>
- <constant>Fallback message</constant>
- </transform>
- </onFallback>
- </circuitBreaker>
- <to uri="mock:result"/>
- </route>
-
- <route>
- <from uri="direct:foo"/>
- <transform>
- <constant>Bye World</constant>
- </transform>
- </route>
- </camelContext>
-
-</beans>
\ No newline at end of file
diff --git a/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json b/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
index 7f7a543ee13..926c5f2c0c0 100644
--- a/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
+++ b/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
@@ -60,8 +60,6 @@
"beans": { "kind": "element", "displayName": "Beans", "required": true, "type": "array", "javaType": "java.util.List<java.lang.Object>", "oneOf": [ "errorHandler" ], "deprecated": false, "autowired": false, "secret": false, "description": "Miscellaneous configurations" },
"defaultServiceCallConfiguration": { "kind": "element", "displayName": "Default Service Call Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.cloud.ServiceCallConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "ServiceCall EIP default configuration" },
"serviceCallConfiguration": { "kind": "element", "displayName": "Service Call Configuration", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.cloud.ServiceCallConfigurationDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "ServiceCall EIP configurations" },
- "defaultHystrixConfiguration": { "kind": "element", "displayName": "Default Hystrix Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.HystrixConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Hystrix EIP default configuration" },
- "hystrixConfiguration": { "kind": "element", "displayName": "Hystrix Configuration", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.HystrixConfigurationDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "Hystrix Circuit Breaker EIP configurations" },
"defaultResilience4jConfiguration": { "kind": "element", "displayName": "Default Resilience4j Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.Resilience4jConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Resilience4j EIP default configuration" },
"resilience4jConfiguration": { "kind": "element", "displayName": "Resilience4j Configuration", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.Resilience4jConfigurationDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "Resilience4j Circuit Breaker EIP configurations" },
"defaultFaultToleranceConfiguration": { "kind": "element", "displayName": "Default Fault Tolerance Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.FaultToleranceConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "MicroProfile Fault Tolerance EIP default configuration" },
diff --git a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
index 029d2ee523c..30a7717f66c 100644
--- a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
+++ b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
@@ -47,7 +47,6 @@ import org.apache.camel.core.xml.CamelStreamCachingStrategyDefinition;
import org.apache.camel.model.ContextScanDefinition;
import org.apache.camel.model.FaultToleranceConfigurationDefinition;
import org.apache.camel.model.GlobalOptionsDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.InterceptDefinition;
import org.apache.camel.model.InterceptFromDefinition;
import org.apache.camel.model.InterceptSendToEndpointDefinition;
@@ -226,10 +225,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Spr
private ServiceCallConfigurationDefinition defaultServiceCallConfiguration;
@XmlElement(name = "serviceCallConfiguration", type = ServiceCallConfigurationDefinition.class)
private List<ServiceCallConfigurationDefinition> serviceCallConfigurations;
- @XmlElement(name = "defaultHystrixConfiguration")
- private HystrixConfigurationDefinition defaultHystrixConfiguration;
- @XmlElement(name = "hystrixConfiguration", type = HystrixConfigurationDefinition.class)
- private List<HystrixConfigurationDefinition> hystrixConfigurations;
@XmlElement(name = "defaultResilience4jConfiguration")
private Resilience4jConfigurationDefinition defaultResilience4jConfiguration;
@XmlElement(name = "resilience4jConfiguration", type = Resilience4jConfigurationDefinition.class)
@@ -1439,30 +1434,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Spr
this.serviceCallConfigurations = serviceCallConfigurations;
}
- @Override
- public List<HystrixConfigurationDefinition> getHystrixConfigurations() {
- return hystrixConfigurations;
- }
-
- @Override
- public HystrixConfigurationDefinition getDefaultHystrixConfiguration() {
- return defaultHystrixConfiguration;
- }
-
- /**
- * Hystrix EIP default configuration
- */
- public void setDefaultHystrixConfiguration(HystrixConfigurationDefinition defaultHystrixConfiguration) {
- this.defaultHystrixConfiguration = defaultHystrixConfiguration;
- }
-
- /**
- * Hystrix Circuit Breaker EIP configurations
- */
- public void setHystrixConfigurations(List<HystrixConfigurationDefinition> hystrixConfigurations) {
- this.hystrixConfigurations = hystrixConfigurations;
- }
-
@Override
public Resilience4jConfigurationDefinition getDefaultResilience4jConfiguration() {
return defaultResilience4jConfiguration;
diff --git a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/handler/CamelNamespaceHandler.java b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/handler/CamelNamespaceHandler.java
index affa74a03c2..e1af65155c5 100644
--- a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/handler/CamelNamespaceHandler.java
+++ b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/handler/CamelNamespaceHandler.java
@@ -455,8 +455,6 @@ public class CamelNamespaceHandler extends NamespaceHandlerSupport {
builder.addPropertyValue("beans", factoryBean.getBeans());
builder.addPropertyValue("defaultServiceCallConfiguration", factoryBean.getDefaultServiceCallConfiguration());
builder.addPropertyValue("serviceCallConfigurations", factoryBean.getServiceCallConfigurations());
- builder.addPropertyValue("defaultHystrixConfiguration", factoryBean.getDefaultHystrixConfiguration());
- builder.addPropertyValue("hystrixConfigurations", factoryBean.getHystrixConfigurations());
// add any depends-on
addDependsOn(factoryBean, builder);
}
diff --git a/components/pom.xml b/components/pom.xml
index af23078f666..7a969d7b432 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -67,7 +67,6 @@
<module>camel-http-base</module>
<module>camel-http-common</module>
<module>camel-http</module>
- <module>camel-hystrix</module>
<module>camel-ipfs</module>
<module>camel-jetty-common</module>
<module>camel-jetty</module>
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/examples/json/hystrixConfiguration.json b/core/camel-core-engine/src/main/docs/modules/eips/examples/json/hystrixConfiguration.json
deleted file mode 120000
index d372ff20660..00000000000
--- a/core/camel-core-engine/src/main/docs/modules/eips/examples/json/hystrixConfiguration.json
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../camel-core-model/src/generated/resources/org/apache/camel/model/hystrixConfiguration.json
\ No newline at end of file
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/nav.adoc b/core/camel-core-engine/src/main/docs/modules/eips/nav.adoc
index 67a091aa45d..0a86a485130 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/nav.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/nav.adoc
@@ -25,7 +25,6 @@
** xref:eips:filter-eip.adoc[Filter]
** xref:eips:from-eip.adoc[From]
** xref:eips:guaranteed-delivery.adoc[Guaranteed Delivery]
- ** xref:eips:hystrix-eip.adoc[Hystrix Circuit Breaker (deprecated)]
** xref:eips:idempotentConsumer-eip.adoc[Idempotent Consumer]
** xref:eips:inOnly-eip.adoc[In Only]
** xref:eips:inOut-eip.adoc[In Out]
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/circuitBreaker-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/circuitBreaker-eip.adoc
index 4d06dd69b5c..9f481490f9f 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/circuitBreaker-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/circuitBreaker-eip.adoc
@@ -65,8 +65,7 @@ And in XML DSL:
== Circuit Breaker components
-Camel provides three implementations of this pattern:
+Camel provides two implementations of this pattern:
-* xref:hystrix-eip.adoc[Hystrix] - *Deprecated:* Using the Netflix Hystrix implementation
* xref:resilience4j-eip.adoc[Resilience4j] - Using the Resilience4j implementation
* xref:fault-tolerance-eip.adoc[Fault Tolerance] - Using the MicroProfile Fault Tolerance implementation
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/hystrix-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/hystrix-eip.adoc
deleted file mode 100644
index 8fc450621c7..00000000000
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/hystrix-eip.adoc
+++ /dev/null
@@ -1,155 +0,0 @@
-= Hystrix EIP (deprecated)
-
-The Hystrix EIP provides integration with Netflix https://github.com/Netflix/Hystrix[Hystrix]
-to be used as xref:circuitBreaker-eip.adoc[Circuit Breaker] in the Camel routes.
-
-Resilience4j is a lightweight fault tolerance library inspired by Netflix Hystrix, but designed for functional programming.
-
-== Configuration options
-
-// eip options: START
-The Hystrix EIP supports 2 options which are listed below:
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *hystrixConfiguration* | Configures the Hystrix EIP Use end when configuration is complete, to return back to the Hystrix EIP. | | HystrixConfigurationDefinition
-| *hystrixConfigurationRef* | Refers to a Hystrix configuration to use for configuring the Hystrix EIP. | | String
-|===
-// eip options: END
-
-See xref:hystrixConfiguration-eip.adoc[Hystrix Configuration] for all the configuration options
-on the Hystrix xref:circuitBreaker-eip.adoc[Circuit Breaker].
-
-== Using Hystrix EIP
-
-Below is an example route showing a Hystrix EIP circuit breaker
-that protects against a downstream HTTP operation with fallback.
-
-[source,java]
-----
-from("direct:start")
- .circuitBreaker()
- .to("http://fooservice.com/slow")
- .onFallback()
- .transform().constant("Fallback message")
- .end()
- .to("mock:result");
-----
-
-And in XML DSL:
-
-[source,xml]
-----
-<route>
- <from uri="direct:start"/>
- <circuitBreaker>
- <to uri="http://fooservice.com/faulty"/>
- <onFallback>
- <transform>
- <constant>Fallback message</constant>
- </transform>
- </onFallback>
- </circuitBreaker>
- <to uri="mock:result"/>
-</route>
-----
-
-In case the calling the downstream HTTP service is failing, and an exception is thrown
-then the circuit breaker will react and execute the fallback route instead.
-
-If there was no fallback, then the circuit breaker will throw an exception.
-
-TIP: For more information about fallback see xref:onFallback-eip.adoc[onFallback].
-
-=== Configuring Hystrix
-
-You can fine-tune Hystrix EIP by the many xref:hystrixConfiguration-eip.adoc[Hystrix Configuration] options.
-
-For example to use 2 second execution timeout, you can do as follows:
-
-[source,java]
-----
-from("direct:start")
- .circuitBreaker()
- // use 2 second timeout
- .hystrixConfiguration().executionTimeoutInMilliseconds(2000).end()
- .log("Hystrix processing start: ${threadName}")
- .to("http://fooservice.com/faulty")
- .log("Hystrix processing end: ${threadName}")
- .end()
- .log("After Hystrix ${body}");
-----
-
-And in XML:
-
-[source,xml]
-----
-<route>
- <from uri="direct:start"/>
- <circuitBreaker>
- <hystrixConfiguration executionTimeoutInMilliseconds="2000"/>
- <log message="Hystrix processing start: ${threadName}"/>
- <to uri="http://fooservice.com/faulty"/>
- <log message="Hystrix processing end: ${threadName}"/>
- </circuitBreaker>
- <log message="After Hystrix: ${body}"/>
-</route>
-----
-
-In this example if calling the downstream service does not return a response within 2 seconds,
-a timeout is triggered, and the exchange will fail with a `TimeoutException`.
-
-=== Camel's Error Handler and Circuit Breaker EIP
-
-By default, the xref:circuitBreaker-eip.adoc[Circuit Breaker] EIP handles errors by itself.
-This means if the circuit breaker is open, and the message fails, then Camel's error handler
-is not reacting also.
-
-However, you can enable Camels error handler with circuit breaker by enabling
-the `inheritErrorHandler` option, as shown:
-
-[source,java]
-----
-// Camel's error handler that will attempt to redeliver the message 3 times
-errorHandler(deadLetterChannel("mock:dead").maximumRedeliveries(3).redeliveryDelay(0));
-
-from("direct:start")
- .to("log:start")
- // turn on Camel's error handler on circuit breaker so Camel can do redeliveries
- .circuitBreaker().inheritErrorHandler(true)
- .to("mock:a")
- .throwException(new IllegalArgumentException("Forced"))
- .end()
- .to("log:result")
- .to("mock:result");
-----
-
-This example is from a test, where you can see the Circuit Breaker EIP block has been hardcoded
-to always fail by throwing an exception. Because the `inheritErrorHandler` has been enabled,
-then Camel's error handler will attempt to call the Circuit Breaker EIP block again.
-
-That means the `mock:a` endpoint will receive the message again, and a total of 1 + 3 = 4 message
-(first time + 3 redeliveries).
-
-If we turn off the `inheritErrorHandler` option (default) then the Circuit Breaker EIP will only be
-executed once because it handled the error itself.
-
-== Dependencies
-
-[NOTE]
-====
-Camel provides the xref:circuitBreaker-eip.adoc[Circuit Breaker] EIP in the route model, which allows to plugin different implementations.
-Hystrix is one such implementation.
-====
-
-Maven users will need to add the following dependency to their pom.xml to use this EIP:
-
-[source,xml]
-----
-<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-hystrix</artifactId>
- <version>x.x.x</version><!-- use the same version as your Camel core version -->
-</dependency>
-----
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/hystrixConfiguration-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/hystrixConfiguration-eip.adoc
deleted file mode 100644
index 78c47033cac..00000000000
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/hystrixConfiguration-eip.adoc
+++ /dev/null
@@ -1,17 +0,0 @@
-= Hystrix Configuration EIP (deprecated)
-:doctitle: Hystrix Configuration
-:shortname: hystrixConfiguration
-:description: Hystrix Circuit Breaker EIP configuration
-:since:
-:supportlevel: Stable-deprecated
-:deprecated: *deprecated*
-
-This page documents all the specific options for the xref:hystrix-eip.adoc[Hystrix] EIP.
-
-// eip options: START
-include::partial$eip-options.adoc[]
-// eip options: END
-
-== Example
-
-See xref:hystrix-eip.adoc[Hystrix] EIP for details how to use this EIP.
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/onFallback-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/onFallback-eip.adoc
index 8a38163057b..607dd5b3cc8 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/onFallback-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/onFallback-eip.adoc
@@ -22,5 +22,4 @@ For examples how to use this see the various Circuit Breaker implementations:
- xref:fault-tolerance-eip.adoc[FaultTolerance EIP] - MicroProfile Fault Tolerance Circuit Breaker
- xref:resilience4j-eip.adoc[Resilience4j EIP] - Resilience4j Circuit Breaker
-- xref:hystrix-eip.adoc[Hystrix EIP] - Netflix Hystrix Circuit Breaker *deprecated*
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index 6bb128d8100..7e96ea6640c 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -49,7 +49,6 @@ import org.apache.camel.impl.scan.AssignableToPackageScanFilter;
import org.apache.camel.impl.scan.InvertingPackageScanFilter;
import org.apache.camel.model.DataFormatDefinition;
import org.apache.camel.model.FaultToleranceConfigurationDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.Model;
import org.apache.camel.model.ModelCamelContext;
import org.apache.camel.model.ModelLifecycleStrategy;
@@ -539,38 +538,6 @@ public class DefaultCamelContext extends SimpleCamelContext implements ModelCame
model.setValidators(validators);
}
- @Override
- public HystrixConfigurationDefinition getHystrixConfiguration(String id) {
- if (model == null && isLightweight()) {
- throw new IllegalStateException("Access to model not supported in lightweight mode");
- }
- return model.getHystrixConfiguration(id);
- }
-
- @Override
- public void setHystrixConfiguration(HystrixConfigurationDefinition configuration) {
- if (model == null && isLightweight()) {
- throw new IllegalStateException("Access to model not supported in lightweight mode");
- }
- model.setHystrixConfiguration(configuration);
- }
-
- @Override
- public void setHystrixConfigurations(List<HystrixConfigurationDefinition> configurations) {
- if (model == null && isLightweight()) {
- throw new IllegalStateException("Access to model not supported in lightweight mode");
- }
- model.setHystrixConfigurations(configurations);
- }
-
- @Override
- public void addHystrixConfiguration(String id, HystrixConfigurationDefinition configuration) {
- if (model == null && isLightweight()) {
- throw new IllegalStateException("Access to model not supported in lightweight mode");
- }
- model.addHystrixConfiguration(id, configuration);
- }
-
@Override
public Resilience4jConfigurationDefinition getResilience4jConfiguration(String id) {
if (model == null && isLightweight()) {
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultModel.java b/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultModel.java
index 179cc444384..816aac85b73 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultModel.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultModel.java
@@ -40,7 +40,6 @@ import org.apache.camel.model.BeanFactoryDefinition;
import org.apache.camel.model.DataFormatDefinition;
import org.apache.camel.model.DefaultRouteTemplateContext;
import org.apache.camel.model.FaultToleranceConfigurationDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.Model;
import org.apache.camel.model.ModelCamelContext;
import org.apache.camel.model.ModelLifecycleStrategy;
@@ -94,7 +93,6 @@ public class DefaultModel implements Model {
private List<TransformerDefinition> transformers = new ArrayList<>();
private List<ValidatorDefinition> validators = new ArrayList<>();
private final Map<String, ServiceCallConfigurationDefinition> serviceCallConfigurations = new ConcurrentHashMap<>();
- private final Map<String, HystrixConfigurationDefinition> hystrixConfigurations = new ConcurrentHashMap<>();
private final Map<String, Resilience4jConfigurationDefinition> resilience4jConfigurations = new ConcurrentHashMap<>();
private final Map<String, FaultToleranceConfigurationDefinition> faultToleranceConfigurations = new ConcurrentHashMap<>();
private Function<RouteDefinition, Boolean> routeFilter;
@@ -737,34 +735,6 @@ public class DefaultModel implements Model {
serviceCallConfigurations.put(serviceName, configuration);
}
- @Override
- public HystrixConfigurationDefinition getHystrixConfiguration(String id) {
- if (id == null) {
- id = "";
- }
-
- return hystrixConfigurations.get(id);
- }
-
- @Override
- public void setHystrixConfiguration(HystrixConfigurationDefinition configuration) {
- hystrixConfigurations.put("", configuration);
- }
-
- @Override
- public void setHystrixConfigurations(List<HystrixConfigurationDefinition> configurations) {
- if (configurations != null) {
- for (HystrixConfigurationDefinition configuration : configurations) {
- hystrixConfigurations.put(configuration.getId(), configuration);
- }
- }
- }
-
- @Override
- public void addHystrixConfiguration(String id, HystrixConfigurationDefinition configuration) {
- hystrixConfigurations.put(id, configuration);
- }
-
@Override
public Resilience4jConfigurationDefinition getResilience4jConfiguration(String id) {
if (id == null) {
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java b/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
index 7d48ffb045b..5afb8d37a2e 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
@@ -59,7 +59,6 @@ import org.apache.camel.health.HealthCheckResolver;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.model.DataFormatDefinition;
import org.apache.camel.model.FaultToleranceConfigurationDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.ModelCamelContext;
import org.apache.camel.model.ModelLifecycleStrategy;
import org.apache.camel.model.ProcessorDefinition;
@@ -1976,26 +1975,6 @@ public class LightweightCamelContext implements ExtendedCamelContext, CatalogCam
getModelCamelContext().setValidators(validators);
}
- @Override
- public HystrixConfigurationDefinition getHystrixConfiguration(String id) {
- return getModelCamelContext().getHystrixConfiguration(id);
- }
-
- @Override
- public void setHystrixConfiguration(HystrixConfigurationDefinition configuration) {
- getModelCamelContext().setHystrixConfiguration(configuration);
- }
-
- @Override
- public void setHystrixConfigurations(List<HystrixConfigurationDefinition> configurations) {
- getModelCamelContext().setHystrixConfigurations(configurations);
- }
-
- @Override
- public void addHystrixConfiguration(String id, HystrixConfigurationDefinition configuration) {
- getModelCamelContext().addHystrixConfiguration(id, configuration);
- }
-
@Override
public Resilience4jConfigurationDefinition getResilience4jConfiguration(String id) {
return getModelCamelContext().getResilience4jConfiguration(id);
diff --git a/core/camel-core-model/src/generated/java/org/apache/camel/model/HystrixConfigurationDefinitionConfigurer.java b/core/camel-core-model/src/generated/java/org/apache/camel/model/HystrixConfigurationDefinitionConfigurer.java
deleted file mode 100644
index e827f5f5c3d..00000000000
--- a/core/camel-core-model/src/generated/java/org/apache/camel/model/HystrixConfigurationDefinitionConfigurer.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-package org.apache.camel.model;
-
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
-import org.apache.camel.spi.PropertyConfigurerGetter;
-import org.apache.camel.spi.ConfigurerStrategy;
-import org.apache.camel.spi.GeneratedPropertyConfigurer;
-import org.apache.camel.util.CaseInsensitiveMap;
-import org.apache.camel.model.HystrixConfigurationDefinition;
-
-/**
- * Generated by camel build tools - do NOT edit this file!
- */
-@SuppressWarnings("unchecked")
-public class HystrixConfigurationDefinitionConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, ExtendedPropertyConfigurerGetter {
-
- private static final Map<String, Object> ALL_OPTIONS;
- static {
- Map<String, Object> map = new CaseInsensitiveMap();
- map.put("AllowMaximumSizeToDivergeFromCoreSize", java.lang.String.class);
- map.put("CircuitBreakerEnabled", java.lang.String.class);
- map.put("CircuitBreakerErrorThresholdPercentage", java.lang.String.class);
- map.put("CircuitBreakerForceClosed", java.lang.String.class);
- map.put("CircuitBreakerForceOpen", java.lang.String.class);
- map.put("CircuitBreakerRequestVolumeThreshold", java.lang.String.class);
- map.put("CircuitBreakerSleepWindowInMilliseconds", java.lang.String.class);
- map.put("CorePoolSize", java.lang.String.class);
- map.put("ExecutionIsolationSemaphoreMaxConcurrentRequests", java.lang.String.class);
- map.put("ExecutionIsolationStrategy", java.lang.String.class);
- map.put("ExecutionIsolationThreadInterruptOnTimeout", java.lang.String.class);
- map.put("ExecutionTimeoutEnabled", java.lang.String.class);
- map.put("ExecutionTimeoutInMilliseconds", java.lang.String.class);
- map.put("FallbackEnabled", java.lang.String.class);
- map.put("FallbackIsolationSemaphoreMaxConcurrentRequests", java.lang.String.class);
- map.put("GroupKey", java.lang.String.class);
- map.put("Id", java.lang.String.class);
- map.put("KeepAliveTime", java.lang.String.class);
- map.put("MaxQueueSize", java.lang.String.class);
- map.put("MaximumSize", java.lang.String.class);
- map.put("MetricsHealthSnapshotIntervalInMilliseconds", java.lang.String.class);
- map.put("MetricsRollingPercentileBucketSize", java.lang.String.class);
- map.put("MetricsRollingPercentileEnabled", java.lang.String.class);
- map.put("MetricsRollingPercentileWindowBuckets", java.lang.String.class);
- map.put("MetricsRollingPercentileWindowInMilliseconds", java.lang.String.class);
- map.put("MetricsRollingStatisticalWindowBuckets", java.lang.String.class);
- map.put("MetricsRollingStatisticalWindowInMilliseconds", java.lang.String.class);
- map.put("QueueSizeRejectionThreshold", java.lang.String.class);
- map.put("RequestLogEnabled", java.lang.String.class);
- map.put("ThreadPoolKey", java.lang.String.class);
- map.put("ThreadPoolRollingNumberStatisticalWindowBuckets", java.lang.String.class);
- map.put("ThreadPoolRollingNumberStatisticalWindowInMilliseconds", java.lang.String.class);
- ALL_OPTIONS = map;
- }
-
- @Override
- public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
- org.apache.camel.model.HystrixConfigurationDefinition target = (org.apache.camel.model.HystrixConfigurationDefinition) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "allowmaximumsizetodivergefromcoresize":
- case "AllowMaximumSizeToDivergeFromCoreSize": target.setAllowMaximumSizeToDivergeFromCoreSize(property(camelContext, java.lang.String.class, value)); return true;
- case "circuitbreakerenabled":
- case "CircuitBreakerEnabled": target.setCircuitBreakerEnabled(property(camelContext, java.lang.String.class, value)); return true;
- case "circuitbreakererrorthresholdpercentage":
- case "CircuitBreakerErrorThresholdPercentage": target.setCircuitBreakerErrorThresholdPercentage(property(camelContext, java.lang.String.class, value)); return true;
- case "circuitbreakerforceclosed":
- case "CircuitBreakerForceClosed": target.setCircuitBreakerForceClosed(property(camelContext, java.lang.String.class, value)); return true;
- case "circuitbreakerforceopen":
- case "CircuitBreakerForceOpen": target.setCircuitBreakerForceOpen(property(camelContext, java.lang.String.class, value)); return true;
- case "circuitbreakerrequestvolumethreshold":
- case "CircuitBreakerRequestVolumeThreshold": target.setCircuitBreakerRequestVolumeThreshold(property(camelContext, java.lang.String.class, value)); return true;
- case "circuitbreakersleepwindowinmilliseconds":
- case "CircuitBreakerSleepWindowInMilliseconds": target.setCircuitBreakerSleepWindowInMilliseconds(property(camelContext, java.lang.String.class, value)); return true;
- case "corepoolsize":
- case "CorePoolSize": target.setCorePoolSize(property(camelContext, java.lang.String.class, value)); return true;
- case "executionisolationsemaphoremaxconcurrentrequests":
- case "ExecutionIsolationSemaphoreMaxConcurrentRequests": target.setExecutionIsolationSemaphoreMaxConcurrentRequests(property(camelContext, java.lang.String.class, value)); return true;
- case "executionisolationstrategy":
- case "ExecutionIsolationStrategy": target.setExecutionIsolationStrategy(property(camelContext, java.lang.String.class, value)); return true;
- case "executionisolationthreadinterruptontimeout":
- case "ExecutionIsolationThreadInterruptOnTimeout": target.setExecutionIsolationThreadInterruptOnTimeout(property(camelContext, java.lang.String.class, value)); return true;
- case "executiontimeoutenabled":
- case "ExecutionTimeoutEnabled": target.setExecutionTimeoutEnabled(property(camelContext, java.lang.String.class, value)); return true;
- case "executiontimeoutinmilliseconds":
- case "ExecutionTimeoutInMilliseconds": target.setExecutionTimeoutInMilliseconds(property(camelContext, java.lang.String.class, value)); return true;
- case "fallbackenabled":
- case "FallbackEnabled": target.setFallbackEnabled(property(camelContext, java.lang.String.class, value)); return true;
- case "fallbackisolationsemaphoremaxconcurrentrequests":
- case "FallbackIsolationSemaphoreMaxConcurrentRequests": target.setFallbackIsolationSemaphoreMaxConcurrentRequests(property(camelContext, java.lang.String.class, value)); return true;
- case "groupkey":
- case "GroupKey": target.setGroupKey(property(camelContext, java.lang.String.class, value)); return true;
- case "id":
- case "Id": target.setId(property(camelContext, java.lang.String.class, value)); return true;
- case "keepalivetime":
- case "KeepAliveTime": target.setKeepAliveTime(property(camelContext, java.lang.String.class, value)); return true;
- case "maxqueuesize":
- case "MaxQueueSize": target.setMaxQueueSize(property(camelContext, java.lang.String.class, value)); return true;
- case "maximumsize":
- case "MaximumSize": target.setMaximumSize(property(camelContext, java.lang.String.class, value)); return true;
- case "metricshealthsnapshotintervalinmilliseconds":
- case "MetricsHealthSnapshotIntervalInMilliseconds": target.setMetricsHealthSnapshotIntervalInMilliseconds(property(camelContext, java.lang.String.class, value)); return true;
- case "metricsrollingpercentilebucketsize":
- case "MetricsRollingPercentileBucketSize": target.setMetricsRollingPercentileBucketSize(property(camelContext, java.lang.String.class, value)); return true;
- case "metricsrollingpercentileenabled":
- case "MetricsRollingPercentileEnabled": target.setMetricsRollingPercentileEnabled(property(camelContext, java.lang.String.class, value)); return true;
- case "metricsrollingpercentilewindowbuckets":
- case "MetricsRollingPercentileWindowBuckets": target.setMetricsRollingPercentileWindowBuckets(property(camelContext, java.lang.String.class, value)); return true;
- case "metricsrollingpercentilewindowinmilliseconds":
- case "MetricsRollingPercentileWindowInMilliseconds": target.setMetricsRollingPercentileWindowInMilliseconds(property(camelContext, java.lang.String.class, value)); return true;
- case "metricsrollingstatisticalwindowbuckets":
- case "MetricsRollingStatisticalWindowBuckets": target.setMetricsRollingStatisticalWindowBuckets(property(camelContext, java.lang.String.class, value)); return true;
- case "metricsrollingstatisticalwindowinmilliseconds":
- case "MetricsRollingStatisticalWindowInMilliseconds": target.setMetricsRollingStatisticalWindowInMilliseconds(property(camelContext, java.lang.String.class, value)); return true;
- case "queuesizerejectionthreshold":
- case "QueueSizeRejectionThreshold": target.setQueueSizeRejectionThreshold(property(camelContext, java.lang.String.class, value)); return true;
- case "requestlogenabled":
- case "RequestLogEnabled": target.setRequestLogEnabled(property(camelContext, java.lang.String.class, value)); return true;
- case "threadpoolkey":
- case "ThreadPoolKey": target.setThreadPoolKey(property(camelContext, java.lang.String.class, value)); return true;
- case "threadpoolrollingnumberstatisticalwindowbuckets":
- case "ThreadPoolRollingNumberStatisticalWindowBuckets": target.setThreadPoolRollingNumberStatisticalWindowBuckets(property(camelContext, java.lang.String.class, value)); return true;
- case "threadpoolrollingnumberstatisticalwindowinmilliseconds":
- case "ThreadPoolRollingNumberStatisticalWindowInMilliseconds": target.setThreadPoolRollingNumberStatisticalWindowInMilliseconds(property(camelContext, java.lang.String.class, value)); return true;
- default: return false;
- }
- }
-
- @Override
- public Map<String, Object> getAllOptions(Object target) {
- return ALL_OPTIONS;
- }
-
- @Override
- public Class<?> getOptionType(String name, boolean ignoreCase) {
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "allowmaximumsizetodivergefromcoresize":
- case "AllowMaximumSizeToDivergeFromCoreSize": return java.lang.String.class;
- case "circuitbreakerenabled":
- case "CircuitBreakerEnabled": return java.lang.String.class;
- case "circuitbreakererrorthresholdpercentage":
- case "CircuitBreakerErrorThresholdPercentage": return java.lang.String.class;
- case "circuitbreakerforceclosed":
- case "CircuitBreakerForceClosed": return java.lang.String.class;
- case "circuitbreakerforceopen":
- case "CircuitBreakerForceOpen": return java.lang.String.class;
- case "circuitbreakerrequestvolumethreshold":
- case "CircuitBreakerRequestVolumeThreshold": return java.lang.String.class;
- case "circuitbreakersleepwindowinmilliseconds":
- case "CircuitBreakerSleepWindowInMilliseconds": return java.lang.String.class;
- case "corepoolsize":
- case "CorePoolSize": return java.lang.String.class;
- case "executionisolationsemaphoremaxconcurrentrequests":
- case "ExecutionIsolationSemaphoreMaxConcurrentRequests": return java.lang.String.class;
- case "executionisolationstrategy":
- case "ExecutionIsolationStrategy": return java.lang.String.class;
- case "executionisolationthreadinterruptontimeout":
- case "ExecutionIsolationThreadInterruptOnTimeout": return java.lang.String.class;
- case "executiontimeoutenabled":
- case "ExecutionTimeoutEnabled": return java.lang.String.class;
- case "executiontimeoutinmilliseconds":
- case "ExecutionTimeoutInMilliseconds": return java.lang.String.class;
- case "fallbackenabled":
- case "FallbackEnabled": return java.lang.String.class;
- case "fallbackisolationsemaphoremaxconcurrentrequests":
- case "FallbackIsolationSemaphoreMaxConcurrentRequests": return java.lang.String.class;
- case "groupkey":
- case "GroupKey": return java.lang.String.class;
- case "id":
- case "Id": return java.lang.String.class;
- case "keepalivetime":
- case "KeepAliveTime": return java.lang.String.class;
- case "maxqueuesize":
- case "MaxQueueSize": return java.lang.String.class;
- case "maximumsize":
- case "MaximumSize": return java.lang.String.class;
- case "metricshealthsnapshotintervalinmilliseconds":
- case "MetricsHealthSnapshotIntervalInMilliseconds": return java.lang.String.class;
- case "metricsrollingpercentilebucketsize":
- case "MetricsRollingPercentileBucketSize": return java.lang.String.class;
- case "metricsrollingpercentileenabled":
- case "MetricsRollingPercentileEnabled": return java.lang.String.class;
- case "metricsrollingpercentilewindowbuckets":
- case "MetricsRollingPercentileWindowBuckets": return java.lang.String.class;
- case "metricsrollingpercentilewindowinmilliseconds":
- case "MetricsRollingPercentileWindowInMilliseconds": return java.lang.String.class;
- case "metricsrollingstatisticalwindowbuckets":
- case "MetricsRollingStatisticalWindowBuckets": return java.lang.String.class;
- case "metricsrollingstatisticalwindowinmilliseconds":
- case "MetricsRollingStatisticalWindowInMilliseconds": return java.lang.String.class;
- case "queuesizerejectionthreshold":
- case "QueueSizeRejectionThreshold": return java.lang.String.class;
- case "requestlogenabled":
- case "RequestLogEnabled": return java.lang.String.class;
- case "threadpoolkey":
- case "ThreadPoolKey": return java.lang.String.class;
- case "threadpoolrollingnumberstatisticalwindowbuckets":
- case "ThreadPoolRollingNumberStatisticalWindowBuckets": return java.lang.String.class;
- case "threadpoolrollingnumberstatisticalwindowinmilliseconds":
- case "ThreadPoolRollingNumberStatisticalWindowInMilliseconds": return java.lang.String.class;
- default: return null;
- }
- }
-
- @Override
- public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
- org.apache.camel.model.HystrixConfigurationDefinition target = (org.apache.camel.model.HystrixConfigurationDefinition) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "allowmaximumsizetodivergefromcoresize":
- case "AllowMaximumSizeToDivergeFromCoreSize": return target.getAllowMaximumSizeToDivergeFromCoreSize();
- case "circuitbreakerenabled":
- case "CircuitBreakerEnabled": return target.getCircuitBreakerEnabled();
- case "circuitbreakererrorthresholdpercentage":
- case "CircuitBreakerErrorThresholdPercentage": return target.getCircuitBreakerErrorThresholdPercentage();
- case "circuitbreakerforceclosed":
- case "CircuitBreakerForceClosed": return target.getCircuitBreakerForceClosed();
- case "circuitbreakerforceopen":
- case "CircuitBreakerForceOpen": return target.getCircuitBreakerForceOpen();
- case "circuitbreakerrequestvolumethreshold":
- case "CircuitBreakerRequestVolumeThreshold": return target.getCircuitBreakerRequestVolumeThreshold();
- case "circuitbreakersleepwindowinmilliseconds":
- case "CircuitBreakerSleepWindowInMilliseconds": return target.getCircuitBreakerSleepWindowInMilliseconds();
- case "corepoolsize":
- case "CorePoolSize": return target.getCorePoolSize();
- case "executionisolationsemaphoremaxconcurrentrequests":
- case "ExecutionIsolationSemaphoreMaxConcurrentRequests": return target.getExecutionIsolationSemaphoreMaxConcurrentRequests();
- case "executionisolationstrategy":
- case "ExecutionIsolationStrategy": return target.getExecutionIsolationStrategy();
- case "executionisolationthreadinterruptontimeout":
- case "ExecutionIsolationThreadInterruptOnTimeout": return target.getExecutionIsolationThreadInterruptOnTimeout();
- case "executiontimeoutenabled":
- case "ExecutionTimeoutEnabled": return target.getExecutionTimeoutEnabled();
- case "executiontimeoutinmilliseconds":
- case "ExecutionTimeoutInMilliseconds": return target.getExecutionTimeoutInMilliseconds();
- case "fallbackenabled":
- case "FallbackEnabled": return target.getFallbackEnabled();
- case "fallbackisolationsemaphoremaxconcurrentrequests":
- case "FallbackIsolationSemaphoreMaxConcurrentRequests": return target.getFallbackIsolationSemaphoreMaxConcurrentRequests();
- case "groupkey":
- case "GroupKey": return target.getGroupKey();
- case "id":
- case "Id": return target.getId();
- case "keepalivetime":
- case "KeepAliveTime": return target.getKeepAliveTime();
- case "maxqueuesize":
- case "MaxQueueSize": return target.getMaxQueueSize();
- case "maximumsize":
- case "MaximumSize": return target.getMaximumSize();
- case "metricshealthsnapshotintervalinmilliseconds":
- case "MetricsHealthSnapshotIntervalInMilliseconds": return target.getMetricsHealthSnapshotIntervalInMilliseconds();
- case "metricsrollingpercentilebucketsize":
- case "MetricsRollingPercentileBucketSize": return target.getMetricsRollingPercentileBucketSize();
- case "metricsrollingpercentileenabled":
- case "MetricsRollingPercentileEnabled": return target.getMetricsRollingPercentileEnabled();
- case "metricsrollingpercentilewindowbuckets":
- case "MetricsRollingPercentileWindowBuckets": return target.getMetricsRollingPercentileWindowBuckets();
- case "metricsrollingpercentilewindowinmilliseconds":
- case "MetricsRollingPercentileWindowInMilliseconds": return target.getMetricsRollingPercentileWindowInMilliseconds();
- case "metricsrollingstatisticalwindowbuckets":
- case "MetricsRollingStatisticalWindowBuckets": return target.getMetricsRollingStatisticalWindowBuckets();
- case "metricsrollingstatisticalwindowinmilliseconds":
- case "MetricsRollingStatisticalWindowInMilliseconds": return target.getMetricsRollingStatisticalWindowInMilliseconds();
- case "queuesizerejectionthreshold":
- case "QueueSizeRejectionThreshold": return target.getQueueSizeRejectionThreshold();
- case "requestlogenabled":
- case "RequestLogEnabled": return target.getRequestLogEnabled();
- case "threadpoolkey":
- case "ThreadPoolKey": return target.getThreadPoolKey();
- case "threadpoolrollingnumberstatisticalwindowbuckets":
- case "ThreadPoolRollingNumberStatisticalWindowBuckets": return target.getThreadPoolRollingNumberStatisticalWindowBuckets();
- case "threadpoolrollingnumberstatisticalwindowinmilliseconds":
- case "ThreadPoolRollingNumberStatisticalWindowInMilliseconds": return target.getThreadPoolRollingNumberStatisticalWindowInMilliseconds();
- default: return null;
- }
- }
-}
-
diff --git a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.model.HystrixConfigurationDefinition b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.model.HystrixConfigurationDefinition
deleted file mode 100644
index 495b0f6e723..00000000000
--- a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.model.HystrixConfigurationDefinition
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.model.HystrixConfigurationDefinitionConfigurer
diff --git a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.model.cloud.RibbonServiceCallServiceLoadBalancerConfiguration b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.model.cloud.RibbonServiceCallServiceLoadBalancerConfiguration
deleted file mode 100644
index 247fd4bfa6a..00000000000
--- a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/configurer/org.apache.camel.model.cloud.RibbonServiceCallServiceLoadBalancerConfiguration
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.model.cloud.RibbonServiceCallServiceLoadBalancerConfigurationConfigurer
diff --git a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
index 24a9d888644..db09be2f23e 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
+++ b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
@@ -63,7 +63,6 @@ header
healthyServiceFilter
hl7
hl7terser
-hystrixConfiguration
ical
idempotentConsumer
inOnly
@@ -153,7 +152,6 @@ sample
script
security
securityDefinitions
-securityRequirements
serviceCall
serviceCallConfiguration
serviceChooserConfiguration
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/circuitBreaker.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/circuitBreaker.json
index 54054748801..aaf7a376cb7 100644
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/circuitBreaker.json
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/circuitBreaker.json
@@ -12,7 +12,6 @@
"output": false
},
"properties": {
- "hystrixConfiguration": { "kind": "element", "displayName": "Hystrix Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.HystrixConfigurationDefinition", "deprecated": true, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use Hystrix with the given configuration." },
"resilience4jConfiguration": { "kind": "element", "displayName": "Resilience4j Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.Resilience4jConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use Resilience4j with the given configuration." },
"faultToleranceConfiguration": { "kind": "element", "displayName": "Fault Tolerance Configuration", "required": false, "type": "object", "javaType": "org.apache.camel.model.FaultToleranceConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use MicroProfile Fault Tolerance with the given configuration." },
"configuration": { "kind": "attribute", "displayName": "Configuration", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Refers to a circuit breaker configuration (such as hystrix, resillience4j, or microprofile-fault-tolerance) to use for configuring the circuit breaker EIP." },
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/hystrixConfiguration.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/hystrixConfiguration.json
deleted file mode 100644
index c41c1508a10..00000000000
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/hystrixConfiguration.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "model": {
- "kind": "model",
- "name": "hystrixConfiguration",
- "title": "Hystrix Configuration",
- "description": "Hystrix Circuit Breaker EIP configuration",
- "deprecated": true,
- "label": "configuration,eip",
- "javaType": "org.apache.camel.model.HystrixConfigurationDefinition",
- "abstract": false,
- "input": false,
- "output": false
- },
- "properties": {
- "groupKey": { "kind": "attribute", "displayName": "Group Key", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "CamelHystrix", "description": "Sets the group key to use. The default value is CamelHystrix." },
- "threadPoolKey": { "kind": "attribute", "displayName": "Thread Pool Key", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "CamelHystrix", "description": "Sets the thread pool key to use. Will by default use the same value as groupKey has been configured to use." },
- "circuitBreakerEnabled": { "kind": "attribute", "displayName": "Circuit Breaker Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to use a HystrixCircuitBreaker or not. If false no circuit-breaker logic will be used and all requests permitted. This is similar in effect to circuitBreakerForceClosed() except that continues tracking m [...]
- "circuitBreakerErrorThresholdPercentage": { "kind": "attribute", "displayName": "Circuit Breaker Error Threshold Percentage", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "50", "description": "Error percentage threshold (as whole number such as 50) at which point the circuit breaker will trip open and reject requests. It will stay tripped for the duration defined in [...]
- "circuitBreakerForceClosed": { "kind": "attribute", "displayName": "Circuit Breaker Force Closed", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true the HystrixCircuitBreaker#allowRequest() will always return true to allow requests regardless of the error percentage from HystrixCommandMetrics.getHealthCounts(). The circuitBreakerForceOpen() [...]
- "circuitBreakerForceOpen": { "kind": "attribute", "displayName": "Circuit Breaker Force Open", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true the HystrixCircuitBreaker.allowRequest() will always return false, causing the circuit to be open (tripped) and reject all requests. This property takes precedence over circuitBreakerForceClosed();" },
- "circuitBreakerRequestVolumeThreshold": { "kind": "attribute", "displayName": "Circuit Breaker Request Volume Threshold", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "20", "description": "Minimum number of requests in the metricsRollingStatisticalWindowInMilliseconds() that must exist before the HystrixCircuitBreaker will trip. If below this number the circuit will [...]
- "circuitBreakerSleepWindowInMilliseconds": { "kind": "attribute", "displayName": "Circuit Breaker Sleep Window In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5000", "description": "The time in milliseconds after a HystrixCircuitBreaker trips open that it should wait before trying requests again." },
- "executionIsolationSemaphoreMaxConcurrentRequests": { "kind": "attribute", "displayName": "Execution Isolation Semaphore Max Concurrent Requests", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "20", "description": "Number of concurrent requests permitted to HystrixCommand.run(). Requests beyond the concurrent limit will be rejected. Applicable only when executionIsol [...]
- "executionIsolationStrategy": { "kind": "attribute", "displayName": "Execution Isolation Strategy", "label": "command", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "THREAD", "SEMAPHORE" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "THREAD", "description": "What isolation strategy HystrixCommand.run() will be executed with. If THREAD then it will be executed on a separate thread and concurrent requests limited by the num [...]
- "executionIsolationThreadInterruptOnTimeout": { "kind": "attribute", "displayName": "Execution Isolation Thread Interrupt On Timeout", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the execution thread should attempt an interrupt (using Future#cancel ) when a thread times out. Applicable only when executionIsolationStrategy() == THREAD." },
- "executionTimeoutInMilliseconds": { "kind": "attribute", "displayName": "Execution Timeout In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "Time in milliseconds at which point the command will timeout and halt execution. If executionIsolationThreadInterruptOnTimeout == true and the command is thread-isolated, the executing threa [...]
- "executionTimeoutEnabled": { "kind": "attribute", "displayName": "Execution Timeout Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the timeout mechanism is enabled for this command" },
- "fallbackIsolationSemaphoreMaxConcurrentRequests": { "kind": "attribute", "displayName": "Fallback Isolation Semaphore Max Concurrent Requests", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Number of concurrent requests permitted to HystrixCommand.getFallback(). Requests beyond the concurrent limit will fail-fast and not attempt retrieving a fa [...]
- "fallbackEnabled": { "kind": "attribute", "displayName": "Fallback Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether HystrixCommand.getFallback() should be attempted when failure occurs." },
- "metricsHealthSnapshotIntervalInMilliseconds": { "kind": "attribute", "displayName": "Metrics Health Snapshot Interval In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "500", "description": "Time in milliseconds to wait between allowing health snapshots to be taken that calculate success and error percentages and affect HystrixCircuitBreaker.isOpen() s [...]
- "metricsRollingPercentileBucketSize": { "kind": "attribute", "displayName": "Metrics Rolling Percentile Bucket Size", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Maximum number of values stored in each bucket of the rolling percentile. This is passed into HystrixRollingPercentile inside HystrixCommandMetrics." },
- "metricsRollingPercentileEnabled": { "kind": "attribute", "displayName": "Metrics Rolling Percentile Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether percentile metrics should be captured using HystrixRollingPercentile inside HystrixCommandMetrics." },
- "metricsRollingPercentileWindowInMilliseconds": { "kind": "attribute", "displayName": "Metrics Rolling Percentile Window In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10000", "description": "Duration of percentile rolling window in milliseconds. This is passed into HystrixRollingPercentile inside HystrixCommandMetrics." },
- "metricsRollingPercentileWindowBuckets": { "kind": "attribute", "displayName": "Metrics Rolling Percentile Window Buckets", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "6", "description": "Number of buckets the rolling percentile window is broken into. This is passed into HystrixRollingPercentile inside HystrixCommandMetrics." },
- "metricsRollingStatisticalWindowInMilliseconds": { "kind": "attribute", "displayName": "Metrics Rolling Statistical Window In Milliseconds", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10000", "description": "This property sets the duration of the statistical rolling window, in milliseconds. This is how long metrics are kept for the thread pool. The window is divi [...]
- "metricsRollingStatisticalWindowBuckets": { "kind": "attribute", "displayName": "Metrics Rolling Statistical Window Buckets", "label": "command", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Number of buckets the rolling statistical window is broken into. This is passed into HystrixRollingNumber inside HystrixCommandMetrics." },
- "requestLogEnabled": { "kind": "attribute", "displayName": "Request Log Enabled", "label": "command", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether HystrixCommand execution and events should be logged to HystrixRequestLog." },
- "corePoolSize": { "kind": "attribute", "displayName": "Core Pool Size", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Core thread-pool size that gets passed to java.util.concurrent.ThreadPoolExecutor#setCorePoolSize(int)" },
- "maximumSize": { "kind": "attribute", "displayName": "Maximum Size", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Maximum thread-pool size that gets passed to ThreadPoolExecutor#setMaximumPoolSize(int) . This is the maximum amount of concurrency that can be supported without starting to reject HystrixCommands. Please note that this setting o [...]
- "keepAliveTime": { "kind": "attribute", "displayName": "Keep Alive Time", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1", "description": "Keep-alive time in minutes that gets passed to ThreadPoolExecutor#setKeepAliveTime(long,TimeUnit)" },
- "maxQueueSize": { "kind": "attribute", "displayName": "Max Queue Size", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "-1", "description": "Max queue size that gets passed to BlockingQueue in HystrixConcurrencyStrategy.getBlockingQueue(int) This should only affect the instantiation of a threadpool - it is not eliglible to change a queue size on the fly. For that, [...]
- "queueSizeRejectionThreshold": { "kind": "attribute", "displayName": "Queue Size Rejection Threshold", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5", "description": "Queue size rejection threshold is an artificial max size at which rejections will occur even if maxQueueSize has not been reached. This is done because the maxQueueSize of a BlockingQueue can not [...]
- "threadPoolRollingNumberStatisticalWindowInMilliseconds": { "kind": "attribute", "displayName": "Thread Pool Rolling Number Statistical Window In Milliseconds", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10000", "description": "Duration of statistical rolling window in milliseconds. This is passed into HystrixRollingNumber inside each HystrixThreadPoolMetrics [...]
- "threadPoolRollingNumberStatisticalWindowBuckets": { "kind": "attribute", "displayName": "Thread Pool Rolling Number Statistical Window Buckets", "label": "threadpool", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "10", "description": "Number of buckets the rolling statistical window is broken into. This is passed into HystrixRollingNumber inside each HystrixThreadPoolMetrics instance." },
- "allowMaximumSizeToDivergeFromCoreSize": { "kind": "attribute", "displayName": "Allow Maximum Size To Diverge From Core Size", "label": "threadpool", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows the configuration for maximumSize to take effect. That value can then be equal to, or higher, than coreSize" },
- "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
- }
-}
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/jaxb.index b/core/camel-core-model/src/generated/resources/org/apache/camel/model/jaxb.index
index 592cf1a32fc..00bff3744d2 100644
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/jaxb.index
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/jaxb.index
@@ -20,7 +20,6 @@ FinallyDefinition
FromDefinition
GlobalOptionDefinition
GlobalOptionsDefinition
-HystrixConfigurationDefinition
IdempotentConsumerDefinition
IdentifiedType
InOnlyDefinition
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/securityRequirements.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/securityRequirements.json
deleted file mode 100644
index 369ba324012..00000000000
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/securityRequirements.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "model": {
- "kind": "model",
- "name": "securityRequirements",
- "title": "Rest Security Requirements",
- "description": "To configure global rest security requirements.",
- "deprecated": false,
- "label": "rest,security,configuration",
- "javaType": "org.apache.camel.model.rest.SecurityRequirementsDefinition",
- "abstract": false,
- "input": false,
- "output": false
- },
- "properties": {
- "securityRequirements": { "kind": "element", "displayName": "Security Requirements", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.rest.SecurityDefinition>", "oneOf": [ "securityRequirement" ], "deprecated": false, "autowired": false, "secret": false, "description": "Security requirement configurations" }
- }
-}
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/CircuitBreakerDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/CircuitBreakerDefinition.java
index 4586f1ee447..8f38e6359bc 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/CircuitBreakerDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/CircuitBreakerDefinition.java
@@ -38,9 +38,6 @@ import org.apache.camel.spi.annotations.DslProperty;
@XmlAccessorType(XmlAccessType.FIELD)
public class CircuitBreakerDefinition extends OutputDefinition<CircuitBreakerDefinition> {
- @XmlElement
- @Deprecated
- private HystrixConfigurationDefinition hystrixConfiguration;
@XmlElement
private Resilience4jConfigurationDefinition resilience4jConfiguration;
@XmlElement
@@ -116,19 +113,6 @@ public class CircuitBreakerDefinition extends OutputDefinition<CircuitBreakerDef
}
}
- // Getter/Setter
- // -------------------------------------------------------------------------
-
- @Deprecated
- public HystrixConfigurationDefinition getHystrixConfiguration() {
- return hystrixConfiguration;
- }
-
- @Deprecated
- public void setHystrixConfiguration(HystrixConfigurationDefinition hystrixConfiguration) {
- this.hystrixConfiguration = hystrixConfiguration;
- }
-
public Resilience4jConfigurationCommon getResilience4jConfiguration() {
return resilience4jConfiguration;
}
@@ -167,27 +151,6 @@ public class CircuitBreakerDefinition extends OutputDefinition<CircuitBreakerDef
// Fluent API
// -------------------------------------------------------------------------
-
- /**
- * Configures the circuit breaker to use Hystrix.
- * <p/>
- * Use <tt>end</tt> when configuration is complete, to return back to the Circuit Breaker EIP.
- */
- @Deprecated
- public HystrixConfigurationDefinition hystrixConfiguration() {
- hystrixConfiguration = hystrixConfiguration == null ? new HystrixConfigurationDefinition(this) : hystrixConfiguration;
- return hystrixConfiguration;
- }
-
- /**
- * Configures the circuit breaker to use Hystrix with the given configuration.
- */
- @Deprecated
- public CircuitBreakerDefinition hystrixConfiguration(HystrixConfigurationDefinition configuration) {
- hystrixConfiguration = configuration;
- return this;
- }
-
/**
* Configures the circuit breaker to use Resilience4j.
* <p/>
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/HystrixConfigurationCommon.java b/core/camel-core-model/src/main/java/org/apache/camel/model/HystrixConfigurationCommon.java
deleted file mode 100644
index bad9d195012..00000000000
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/HystrixConfigurationCommon.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.model;
-
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Future;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-
-import org.apache.camel.spi.Metadata;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@Deprecated
-public class HystrixConfigurationCommon extends IdentifiedType {
-
- @XmlAttribute
- @Metadata(defaultValue = "CamelHystrix")
- private String groupKey;
- @XmlAttribute
- @Metadata(defaultValue = "CamelHystrix")
- private String threadPoolKey;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Boolean", label = "command", defaultValue = "true")
- private String circuitBreakerEnabled;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "50")
- private String circuitBreakerErrorThresholdPercentage;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Boolean", label = "command", defaultValue = "false")
- private String circuitBreakerForceClosed;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Boolean", label = "command", defaultValue = "false")
- private String circuitBreakerForceOpen;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "20")
- private String circuitBreakerRequestVolumeThreshold;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "5000")
- private String circuitBreakerSleepWindowInMilliseconds;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "20")
- private String executionIsolationSemaphoreMaxConcurrentRequests;
- @XmlAttribute
- @Metadata(label = "command", defaultValue = "THREAD", enums = "THREAD,SEMAPHORE")
- private String executionIsolationStrategy;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Boolean", label = "command", defaultValue = "true")
- private String executionIsolationThreadInterruptOnTimeout;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "1000")
- private String executionTimeoutInMilliseconds;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Boolean", label = "command", defaultValue = "true")
- private String executionTimeoutEnabled;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "10")
- private String fallbackIsolationSemaphoreMaxConcurrentRequests;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Boolean", label = "command", defaultValue = "true")
- private String fallbackEnabled;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "500")
- private String metricsHealthSnapshotIntervalInMilliseconds;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "10")
- private String metricsRollingPercentileBucketSize;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Boolean", label = "command", defaultValue = "true")
- private String metricsRollingPercentileEnabled;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "10000")
- private String metricsRollingPercentileWindowInMilliseconds;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "6")
- private String metricsRollingPercentileWindowBuckets;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "10000")
- private String metricsRollingStatisticalWindowInMilliseconds;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "command", defaultValue = "10")
- private String metricsRollingStatisticalWindowBuckets;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Boolean", label = "command", defaultValue = "true")
- private String requestLogEnabled;
-
- // thread-pool
-
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "threadpool", defaultValue = "10")
- private String corePoolSize;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "threadpool", defaultValue = "10")
- private String maximumSize;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "threadpool", defaultValue = "1")
- private String keepAliveTime;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "threadpool", defaultValue = "-1")
- private String maxQueueSize;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "threadpool", defaultValue = "5")
- private String queueSizeRejectionThreshold;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "threadpool", defaultValue = "10000")
- private String threadPoolRollingNumberStatisticalWindowInMilliseconds;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Integer", label = "threadpool", defaultValue = "10")
- private String threadPoolRollingNumberStatisticalWindowBuckets;
- @XmlAttribute
- @Metadata(javaType = "java.lang.Boolean", label = "threadpool", defaultValue = "false")
- private String allowMaximumSizeToDivergeFromCoreSize;
-
- // Getter/Setter
- // -------------------------------------------------------------------------
-
- public String getGroupKey() {
- return groupKey;
- }
-
- /**
- * Sets the group key to use. The default value is CamelHystrix.
- */
- public void setGroupKey(String groupKey) {
- this.groupKey = groupKey;
- }
-
- public String getThreadPoolKey() {
- return threadPoolKey;
- }
-
- /**
- * Sets the thread pool key to use. Will by default use the same value as groupKey has been configured to use.
- */
- public void setThreadPoolKey(String threadPoolKey) {
- this.threadPoolKey = threadPoolKey;
- }
-
- public String getCircuitBreakerEnabled() {
- return circuitBreakerEnabled;
- }
-
- /**
- * Whether to use a HystrixCircuitBreaker or not. If false no circuit-breaker logic will be used and all requests
- * permitted.
- * <p>
- * This is similar in effect to circuitBreakerForceClosed() except that continues tracking metrics and knowing
- * whether it should be open/closed, this property results in not even instantiating a circuit-breaker.
- */
- public void setCircuitBreakerEnabled(String circuitBreakerEnabled) {
- this.circuitBreakerEnabled = circuitBreakerEnabled;
- }
-
- public String getCircuitBreakerErrorThresholdPercentage() {
- return circuitBreakerErrorThresholdPercentage;
- }
-
- /**
- * Error percentage threshold (as whole number such as 50) at which point the circuit breaker will trip open and
- * reject requests.
- * <p>
- * It will stay tripped for the duration defined in circuitBreakerSleepWindowInMilliseconds;
- * <p>
- * The error percentage this is compared against comes from HystrixCommandMetrics.getHealthCounts().
- */
- public void setCircuitBreakerErrorThresholdPercentage(String circuitBreakerErrorThresholdPercentage) {
- this.circuitBreakerErrorThresholdPercentage = circuitBreakerErrorThresholdPercentage;
- }
-
- public String getCircuitBreakerForceClosed() {
- return circuitBreakerForceClosed;
- }
-
- /**
- * If true the HystrixCircuitBreaker#allowRequest() will always return true to allow requests regardless of the
- * error percentage from HystrixCommandMetrics.getHealthCounts().
- * <p>
- * The circuitBreakerForceOpen() property takes precedence so if it set to true this property does nothing.
- */
- public void setCircuitBreakerForceClosed(String circuitBreakerForceClosed) {
- this.circuitBreakerForceClosed = circuitBreakerForceClosed;
- }
-
- public String getCircuitBreakerForceOpen() {
- return circuitBreakerForceOpen;
- }
-
- /**
- * If true the HystrixCircuitBreaker.allowRequest() will always return false, causing the circuit to be open
- * (tripped) and reject all requests.
- * <p>
- * This property takes precedence over circuitBreakerForceClosed();
- */
- public void setCircuitBreakerForceOpen(String circuitBreakerForceOpen) {
- this.circuitBreakerForceOpen = circuitBreakerForceOpen;
- }
-
- public String getCircuitBreakerRequestVolumeThreshold() {
- return circuitBreakerRequestVolumeThreshold;
- }
-
- /**
- * Minimum number of requests in the metricsRollingStatisticalWindowInMilliseconds() that must exist before the
- * HystrixCircuitBreaker will trip.
- * <p>
- * If below this number the circuit will not trip regardless of error percentage.
- */
- public void setCircuitBreakerRequestVolumeThreshold(String circuitBreakerRequestVolumeThreshold) {
- this.circuitBreakerRequestVolumeThreshold = circuitBreakerRequestVolumeThreshold;
- }
-
- public String getCircuitBreakerSleepWindowInMilliseconds() {
- return circuitBreakerSleepWindowInMilliseconds;
- }
-
- /**
- * The time in milliseconds after a HystrixCircuitBreaker trips open that it should wait before trying requests
- * again.
- */
- public void setCircuitBreakerSleepWindowInMilliseconds(String circuitBreakerSleepWindowInMilliseconds) {
- this.circuitBreakerSleepWindowInMilliseconds = circuitBreakerSleepWindowInMilliseconds;
- }
-
- public String getExecutionIsolationSemaphoreMaxConcurrentRequests() {
- return executionIsolationSemaphoreMaxConcurrentRequests;
- }
-
- /**
- * Number of concurrent requests permitted to HystrixCommand.run(). Requests beyond the concurrent limit will be
- * rejected.
- * <p>
- * Applicable only when executionIsolationStrategy == SEMAPHORE.
- */
- public void setExecutionIsolationSemaphoreMaxConcurrentRequests(String executionIsolationSemaphoreMaxConcurrentRequests) {
- this.executionIsolationSemaphoreMaxConcurrentRequests = executionIsolationSemaphoreMaxConcurrentRequests;
- }
-
- public String getExecutionIsolationStrategy() {
- return executionIsolationStrategy;
- }
-
- /**
- * What isolation strategy HystrixCommand.run() will be executed with.
- * <p>
- * If THREAD then it will be executed on a separate thread and concurrent requests limited by the number of threads
- * in the thread-pool.
- * <p>
- * If SEMAPHORE then it will be executed on the calling thread and concurrent requests limited by the semaphore
- * count.
- */
- public void setExecutionIsolationStrategy(String executionIsolationStrategy) {
- this.executionIsolationStrategy = executionIsolationStrategy;
- }
-
- public String getExecutionIsolationThreadInterruptOnTimeout() {
- return executionIsolationThreadInterruptOnTimeout;
- }
-
- /**
- * Whether the execution thread should attempt an interrupt (using {@link Future#cancel}) when a thread times out.
- * <p>
- * Applicable only when executionIsolationStrategy() == THREAD.
- */
- public void setExecutionIsolationThreadInterruptOnTimeout(String executionIsolationThreadInterruptOnTimeout) {
- this.executionIsolationThreadInterruptOnTimeout = executionIsolationThreadInterruptOnTimeout;
- }
-
- public String getExecutionTimeoutInMilliseconds() {
- return executionTimeoutInMilliseconds;
- }
-
- /**
- * Time in milliseconds at which point the command will timeout and halt execution.
- * <p>
- * If {@link #executionIsolationThreadInterruptOnTimeout} == true and the command is thread-isolated, the executing
- * thread will be interrupted. If the command is semaphore-isolated and a HystrixObservableCommand, that command
- * will get unsubscribed.
- */
- public void setExecutionTimeoutInMilliseconds(String executionTimeoutInMilliseconds) {
- this.executionTimeoutInMilliseconds = executionTimeoutInMilliseconds;
- }
-
- public String getExecutionTimeoutEnabled() {
- return executionTimeoutEnabled;
- }
-
- /**
- * Whether the timeout mechanism is enabled for this command
- */
- public void setExecutionTimeoutEnabled(String executionTimeoutEnabled) {
- this.executionTimeoutEnabled = executionTimeoutEnabled;
- }
-
- public String getFallbackIsolationSemaphoreMaxConcurrentRequests() {
- return fallbackIsolationSemaphoreMaxConcurrentRequests;
- }
-
- /**
- * Number of concurrent requests permitted to HystrixCommand.getFallback(). Requests beyond the concurrent limit
- * will fail-fast and not attempt retrieving a fallback.
- */
- public void setFallbackIsolationSemaphoreMaxConcurrentRequests(String fallbackIsolationSemaphoreMaxConcurrentRequests) {
- this.fallbackIsolationSemaphoreMaxConcurrentRequests = fallbackIsolationSemaphoreMaxConcurrentRequests;
- }
-
- public String getFallbackEnabled() {
- return fallbackEnabled;
- }
-
- /**
- * Whether HystrixCommand.getFallback() should be attempted when failure occurs.
- */
- public void setFallbackEnabled(String fallbackEnabled) {
- this.fallbackEnabled = fallbackEnabled;
- }
-
- public String getMetricsHealthSnapshotIntervalInMilliseconds() {
- return metricsHealthSnapshotIntervalInMilliseconds;
- }
-
- /**
- * Time in milliseconds to wait between allowing health snapshots to be taken that calculate success and error
- * percentages and affect HystrixCircuitBreaker.isOpen() status.
- * <p>
- * On high-volume circuits the continual calculation of error percentage can become CPU intensive thus this controls
- * how often it is calculated.
- */
- public void setMetricsHealthSnapshotIntervalInMilliseconds(String metricsHealthSnapshotIntervalInMilliseconds) {
- this.metricsHealthSnapshotIntervalInMilliseconds = metricsHealthSnapshotIntervalInMilliseconds;
- }
-
- public String getMetricsRollingPercentileBucketSize() {
- return metricsRollingPercentileBucketSize;
- }
-
- /**
- * Maximum number of values stored in each bucket of the rolling percentile. This is passed into
- * HystrixRollingPercentile inside HystrixCommandMetrics.
- */
- public void setMetricsRollingPercentileBucketSize(String metricsRollingPercentileBucketSize) {
- this.metricsRollingPercentileBucketSize = metricsRollingPercentileBucketSize;
- }
-
- public String getMetricsRollingPercentileEnabled() {
- return metricsRollingPercentileEnabled;
- }
-
- /**
- * Whether percentile metrics should be captured using HystrixRollingPercentile inside HystrixCommandMetrics.
- */
- public void setMetricsRollingPercentileEnabled(String metricsRollingPercentileEnabled) {
- this.metricsRollingPercentileEnabled = metricsRollingPercentileEnabled;
- }
-
- public String getMetricsRollingPercentileWindowInMilliseconds() {
- return metricsRollingPercentileWindowInMilliseconds;
- }
-
- /**
- * Duration of percentile rolling window in milliseconds. This is passed into HystrixRollingPercentile inside
- * HystrixCommandMetrics.
- */
- public void setMetricsRollingPercentileWindowInMilliseconds(String metricsRollingPercentileWindowInMilliseconds) {
- this.metricsRollingPercentileWindowInMilliseconds = metricsRollingPercentileWindowInMilliseconds;
- }
-
- public String getMetricsRollingPercentileWindowBuckets() {
- return metricsRollingPercentileWindowBuckets;
- }
-
- /**
- * Number of buckets the rolling percentile window is broken into. This is passed into HystrixRollingPercentile
- * inside HystrixCommandMetrics.
- */
- public void setMetricsRollingPercentileWindowBuckets(String metricsRollingPercentileWindowBuckets) {
- this.metricsRollingPercentileWindowBuckets = metricsRollingPercentileWindowBuckets;
- }
-
- public String getMetricsRollingStatisticalWindowInMilliseconds() {
- return metricsRollingStatisticalWindowInMilliseconds;
- }
-
- /**
- * This property sets the duration of the statistical rolling window, in milliseconds. This is how long metrics are
- * kept for the thread pool. The window is divided into buckets and “rolls” by those increments.
- */
- public void setMetricsRollingStatisticalWindowInMilliseconds(String metricsRollingStatisticalWindowInMilliseconds) {
- this.metricsRollingStatisticalWindowInMilliseconds = metricsRollingStatisticalWindowInMilliseconds;
- }
-
- public String getMetricsRollingStatisticalWindowBuckets() {
- return metricsRollingStatisticalWindowBuckets;
- }
-
- /**
- * Number of buckets the rolling statistical window is broken into. This is passed into HystrixRollingNumber inside
- * HystrixCommandMetrics.
- */
- public void setMetricsRollingStatisticalWindowBuckets(String metricsRollingStatisticalWindowBuckets) {
- this.metricsRollingStatisticalWindowBuckets = metricsRollingStatisticalWindowBuckets;
- }
-
- public String getRequestLogEnabled() {
- return requestLogEnabled;
- }
-
- /**
- * Whether HystrixCommand execution and events should be logged to HystrixRequestLog.
- */
- public void setRequestLogEnabled(String requestLogEnabled) {
- this.requestLogEnabled = requestLogEnabled;
- }
-
- public String getCorePoolSize() {
- return corePoolSize;
- }
-
- /**
- * Core thread-pool size that gets passed to {@link java.util.concurrent.ThreadPoolExecutor#setCorePoolSize(int)}
- */
- public void setCorePoolSize(String corePoolSize) {
- this.corePoolSize = corePoolSize;
- }
-
- public String getMaximumSize() {
- return maximumSize;
- }
-
- /**
- * Maximum thread-pool size that gets passed to {@link ThreadPoolExecutor#setMaximumPoolSize(int)}. This is the
- * maximum amount of concurrency that can be supported without starting to reject HystrixCommands. Please note that
- * this setting only takes effect if you also set allowMaximumSizeToDivergeFromCoreSize
- */
- public void setMaximumSize(String maximumSize) {
- this.maximumSize = maximumSize;
- }
-
- public String getKeepAliveTime() {
- return keepAliveTime;
- }
-
- /**
- * Keep-alive time in minutes that gets passed to {@link ThreadPoolExecutor#setKeepAliveTime(long, TimeUnit)}
- */
- public void setKeepAliveTime(String keepAliveTime) {
- this.keepAliveTime = keepAliveTime;
- }
-
- public String getMaxQueueSize() {
- return maxQueueSize;
- }
-
- /**
- * Max queue size that gets passed to {@link BlockingQueue} in HystrixConcurrencyStrategy.getBlockingQueue(int) This
- * should only affect the instantiation of a threadpool - it is not eliglible to change a queue size on the fly. For
- * that, use queueSizeRejectionThreshold().
- */
- public void setMaxQueueSize(String maxQueueSize) {
- this.maxQueueSize = maxQueueSize;
- }
-
- public String getQueueSizeRejectionThreshold() {
- return queueSizeRejectionThreshold;
- }
-
- /**
- * Queue size rejection threshold is an artificial "max" size at which rejections will occur even if
- * {@link #maxQueueSize} has not been reached. This is done because the {@link #maxQueueSize} of a
- * {@link BlockingQueue} can not be dynamically changed and we want to support dynamically changing the queue size
- * that affects rejections.
- * <p>
- * This is used by HystrixCommand when queuing a thread for execution.
- */
- public void setQueueSizeRejectionThreshold(String queueSizeRejectionThreshold) {
- this.queueSizeRejectionThreshold = queueSizeRejectionThreshold;
- }
-
- public String getThreadPoolRollingNumberStatisticalWindowInMilliseconds() {
- return threadPoolRollingNumberStatisticalWindowInMilliseconds;
- }
-
- /**
- * Duration of statistical rolling window in milliseconds. This is passed into HystrixRollingNumber inside each
- * HystrixThreadPoolMetrics instance.
- */
- public void setThreadPoolRollingNumberStatisticalWindowInMilliseconds(
- String threadPoolRollingNumberStatisticalWindowInMilliseconds) {
- this.threadPoolRollingNumberStatisticalWindowInMilliseconds = threadPoolRollingNumberStatisticalWindowInMilliseconds;
- }
-
- public String getThreadPoolRollingNumberStatisticalWindowBuckets() {
- return threadPoolRollingNumberStatisticalWindowBuckets;
- }
-
- /**
- * Number of buckets the rolling statistical window is broken into. This is passed into HystrixRollingNumber inside
- * each HystrixThreadPoolMetrics instance.
- */
- public void setThreadPoolRollingNumberStatisticalWindowBuckets(String threadPoolRollingNumberStatisticalWindowBuckets) {
- this.threadPoolRollingNumberStatisticalWindowBuckets = threadPoolRollingNumberStatisticalWindowBuckets;
- }
-
- public String getAllowMaximumSizeToDivergeFromCoreSize() {
- return allowMaximumSizeToDivergeFromCoreSize;
- }
-
- /**
- * Allows the configuration for maximumSize to take effect. That value can then be equal to, or higher, than
- * coreSize
- */
- public void setAllowMaximumSizeToDivergeFromCoreSize(String allowMaximumSizeToDivergeFromCoreSize) {
- this.allowMaximumSizeToDivergeFromCoreSize = allowMaximumSizeToDivergeFromCoreSize;
- }
-}
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/HystrixConfigurationDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/HystrixConfigurationDefinition.java
deleted file mode 100644
index b7068a8a181..00000000000
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/HystrixConfigurationDefinition.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.model;
-
-import java.util.concurrent.ThreadPoolExecutor;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.apache.camel.spi.Configurer;
-import org.apache.camel.spi.Metadata;
-
-/**
- * Hystrix Circuit Breaker EIP configuration
- */
-@Metadata(label = "configuration,eip")
-@XmlRootElement(name = "hystrixConfiguration")
-@XmlAccessorType(XmlAccessType.FIELD)
-@Configurer(extended = true)
-@Deprecated
-public class HystrixConfigurationDefinition extends HystrixConfigurationCommon {
-
- public static final String DEFAULT_GROUP_KEY = "CamelHystrix";
-
- @XmlTransient
- private CircuitBreakerDefinition parent;
-
- public HystrixConfigurationDefinition() {
- }
-
- public HystrixConfigurationDefinition(CircuitBreakerDefinition parent) {
- this.parent = parent;
- }
-
- // Fluent API
- // -------------------------------------------------------------------------
-
- /**
- * Sets the group key to use. The default value is CamelHystrix.
- */
- public HystrixConfigurationDefinition groupKey(String groupKey) {
- setGroupKey(groupKey);
- return this;
- }
-
- /**
- * Sets the thread pool key to use. Will by default use the same value as groupKey has been configured to use.
- */
- public HystrixConfigurationDefinition threadPoolKey(String threadPoolKey) {
- setThreadPoolKey(threadPoolKey);
- return this;
- }
-
- /**
- * Whether to use a HystrixCircuitBreaker or not. If false no circuit-breaker logic will be used and all requests
- * permitted.
- * <p>
- * This is similar in effect to circuitBreakerForceClosed() except that continues tracking metrics and knowing
- * whether it should be open/closed, this property results in not even instantiating a circuit-breaker.
- */
- public HystrixConfigurationDefinition circuitBreakerEnabled(boolean circuitBreakerEnabled) {
- setCircuitBreakerEnabled(Boolean.toString(circuitBreakerEnabled));
- return this;
- }
-
- /**
- * Error percentage threshold (as whole number such as 50) at which point the circuit breaker will trip open and
- * reject requests.
- * <p>
- * It will stay tripped for the duration defined in circuitBreakerSleepWindowInMilliseconds;
- * <p>
- * The error percentage this is compared against comes from HystrixCommandMetrics.getHealthCounts().
- */
- public HystrixConfigurationDefinition circuitBreakerErrorThresholdPercentage(int circuitBreakerErrorThresholdPercentage) {
- setCircuitBreakerErrorThresholdPercentage(Integer.toString(circuitBreakerErrorThresholdPercentage));
- return this;
- }
-
- /**
- * If true the HystrixCircuitBreaker.allowRequest() will always return true to allow requests regardless of the
- * error percentage from HystrixCommandMetrics.getHealthCounts().
- * <p>
- * The circuitBreakerForceOpen() property takes precedence so if it set to true this property does nothing.
- */
- public HystrixConfigurationDefinition circuitBreakerForceClosed(boolean circuitBreakerForceClosed) {
- setCircuitBreakerForceClosed(Boolean.toString(circuitBreakerForceClosed));
- return this;
- }
-
- /**
- * If true the HystrixCircuitBreaker.allowRequest() will always return false, causing the circuit to be open
- * (tripped) and reject all requests.
- * <p>
- * This property takes precedence over circuitBreakerForceClosed();
- */
- public HystrixConfigurationDefinition circuitBreakerForceOpen(boolean circuitBreakerForceOpen) {
- setCircuitBreakerForceOpen(Boolean.toString(circuitBreakerForceOpen));
- return this;
- }
-
- /**
- * Minimum number of requests in the metricsRollingStatisticalWindowInMilliseconds() that must exist before the
- * HystrixCircuitBreaker will trip.
- * <p>
- * If below this number the circuit will not trip regardless of error percentage.
- */
- public HystrixConfigurationDefinition circuitBreakerRequestVolumeThreshold(int circuitBreakerRequestVolumeThreshold) {
- setCircuitBreakerRequestVolumeThreshold(Integer.toString(circuitBreakerRequestVolumeThreshold));
- return this;
- }
-
- /**
- * The time in milliseconds after a HystrixCircuitBreaker trips open that it should wait before trying requests
- * again.
- */
- public HystrixConfigurationDefinition circuitBreakerSleepWindowInMilliseconds(int circuitBreakerSleepWindowInMilliseconds) {
- setCircuitBreakerSleepWindowInMilliseconds(Integer.toString(circuitBreakerSleepWindowInMilliseconds));
- return this;
- }
-
- /**
- * Number of concurrent requests permitted to HystrixCommand.run(). Requests beyond the concurrent limit will be
- * rejected.
- * <p>
- * Applicable only when executionIsolationStrategy is SEMAPHORE.
- */
- public HystrixConfigurationDefinition executionIsolationSemaphoreMaxConcurrentRequests(
- int executionIsolationSemaphoreMaxConcurrentRequests) {
- setExecutionIsolationSemaphoreMaxConcurrentRequests(Integer.toString(executionIsolationSemaphoreMaxConcurrentRequests));
- return this;
- }
-
- /**
- * What isolation strategy HystrixCommand.run() will be executed with.
- * <p>
- * If THREAD then it will be executed on a separate thread and concurrent requests limited by the number of threads
- * in the thread-pool.
- * <p>
- * If SEMAPHORE then it will be executed on the calling thread and concurrent requests limited by the semaphore
- * count.
- */
- public HystrixConfigurationDefinition executionIsolationStrategy(String executionIsolationStrategy) {
- setExecutionIsolationStrategy(executionIsolationStrategy);
- return this;
- }
-
- /**
- * Whether the execution thread should attempt an interrupt (using Future cancel) when a thread times out.
- * <p>
- * Applicable only when executionIsolationStrategy() is set to THREAD.
- */
- public HystrixConfigurationDefinition executionIsolationThreadInterruptOnTimeout(
- boolean executionIsolationThreadInterruptOnTimeout) {
- setExecutionIsolationThreadInterruptOnTimeout(Boolean.toString(executionIsolationThreadInterruptOnTimeout));
- return this;
- }
-
- /**
- * Time in milliseconds at which point the command will timeout and halt execution.
- * <p>
- * If executionIsolationThreadInterruptOnTimeout is true and the command is thread-isolated, the executing thread
- * will be interrupted. If the command is semaphore-isolated and a HystrixObservableCommand, that command will get
- * unsubscribed.
- */
- public HystrixConfigurationDefinition executionTimeoutInMilliseconds(int executionTimeoutInMilliseconds) {
- setExecutionTimeoutInMilliseconds(Integer.toString(executionTimeoutInMilliseconds));
- return this;
- }
-
- /**
- * Whether the timeout mechanism is enabled for this command
- */
- public HystrixConfigurationDefinition executionTimeoutEnabled(boolean executionTimeoutEnabled) {
- setExecutionTimeoutEnabled(Boolean.toString(executionTimeoutEnabled));
- return this;
- }
-
- /**
- * Number of concurrent requests permitted to HystrixCommand.getFallback(). Requests beyond the concurrent limit
- * will fail-fast and not attempt retrieving a fallback.
- */
- public HystrixConfigurationDefinition fallbackIsolationSemaphoreMaxConcurrentRequests(
- int fallbackIsolationSemaphoreMaxConcurrentRequests) {
- setFallbackIsolationSemaphoreMaxConcurrentRequests(Integer.toString(fallbackIsolationSemaphoreMaxConcurrentRequests));
- return this;
- }
-
- /**
- * Whether HystrixCommand.getFallback() should be attempted when failure occurs.
- */
- public HystrixConfigurationDefinition fallbackEnabled(boolean fallbackEnabled) {
- setFallbackEnabled(Boolean.toString(fallbackEnabled));
- return this;
- }
-
- /**
- * Time in milliseconds to wait between allowing health snapshots to be taken that calculate success and error
- * percentages and affect HystrixCircuitBreaker.isOpen() status.
- * <p>
- * On high-volume circuits the continual calculation of error percentage can become CPU intensive thus this controls
- * how often it is calculated.
- */
- public HystrixConfigurationDefinition metricsHealthSnapshotIntervalInMilliseconds(
- int metricsHealthSnapshotIntervalInMilliseconds) {
- setMetricsHealthSnapshotIntervalInMilliseconds(Integer.toString(metricsHealthSnapshotIntervalInMilliseconds));
- return this;
- }
-
- /**
- * Maximum number of values stored in each bucket of the rolling percentile. This is passed into
- * HystrixRollingPercentile inside HystrixCommandMetrics.
- */
- public HystrixConfigurationDefinition metricsRollingPercentileBucketSize(int metricsRollingPercentileBucketSize) {
- setMetricsRollingPercentileBucketSize(Integer.toString(metricsRollingPercentileBucketSize));
- return this;
- }
-
- /**
- * Whether percentile metrics should be captured using HystrixRollingPercentile inside HystrixCommandMetrics.
- */
- public HystrixConfigurationDefinition metricsRollingPercentileEnabled(boolean metricsRollingPercentileEnabled) {
- setMetricsRollingPercentileEnabled(Boolean.toString(metricsRollingPercentileEnabled));
- return this;
- }
-
- /**
- * Duration of percentile rolling window in milliseconds. This is passed into HystrixRollingPercentile inside
- * HystrixCommandMetrics.
- */
- public HystrixConfigurationDefinition metricsRollingPercentileWindowInMilliseconds(
- int metricsRollingPercentileWindowInMilliseconds) {
- setMetricsRollingPercentileWindowInMilliseconds(Integer.toString(metricsRollingPercentileWindowInMilliseconds));
- return this;
- }
-
- /**
- * Number of buckets the rolling percentile window is broken into. This is passed into HystrixRollingPercentile
- * inside HystrixCommandMetrics.
- */
- public HystrixConfigurationDefinition metricsRollingPercentileWindowBuckets(int metricsRollingPercentileWindowBuckets) {
- setMetricsRollingPercentileWindowBuckets(Integer.toString(metricsRollingPercentileWindowBuckets));
- return this;
- }
-
- /**
- * This property sets the duration of the statistical rolling window, in milliseconds. This is how long metrics are
- * kept for the thread pool. The window is divided into buckets and “rolls” by those increments.
- */
- public HystrixConfigurationDefinition metricsRollingStatisticalWindowInMilliseconds(
- int metricsRollingStatisticalWindowInMilliseconds) {
- setMetricsRollingStatisticalWindowInMilliseconds(Integer.toString(metricsRollingStatisticalWindowInMilliseconds));
- return this;
- }
-
- /**
- * Number of buckets the rolling statistical window is broken into. This is passed into HystrixRollingNumber inside
- * HystrixCommandMetrics.
- */
- public HystrixConfigurationDefinition metricsRollingStatisticalWindowBuckets(int metricsRollingStatisticalWindowBuckets) {
- setMetricsRollingStatisticalWindowBuckets(Integer.toString(metricsRollingStatisticalWindowBuckets));
- return this;
- }
-
- /**
- * Whether HystrixCommand execution and events should be logged to HystrixRequestLog.
- */
- public HystrixConfigurationDefinition requestLogEnabled(boolean requestLogEnabled) {
- setRequestLogEnabled(Boolean.toString(requestLogEnabled));
- return this;
- }
-
- /**
- * Core thread-pool size.
- */
- public HystrixConfigurationDefinition corePoolSize(int corePoolSize) {
- setCorePoolSize(Integer.toString(corePoolSize));
- return this;
- }
-
- /**
- * Keep-alive time in minutes.
- */
- public HystrixConfigurationDefinition keepAliveTime(int keepAliveTime) {
- setKeepAliveTime(Integer.toString(keepAliveTime));
- return this;
- }
-
- /**
- * Max queue size. This should only affect the instantiation of the thread-pool - it is not eligible to change a
- * queue size on the fly.
- */
- public HystrixConfigurationDefinition maxQueueSize(int maxQueueSize) {
- setMaxQueueSize(Integer.toString(maxQueueSize));
- return this;
- }
-
- /**
- * Maximum thread-pool size that gets passed to {@link ThreadPoolExecutor#setMaximumPoolSize(int)}. This is the
- * maximum amount of concurrency that can be supported without starting to reject HystrixCommands. Please note that
- * this setting only takes effect if you also set allowMaximumSizeToDivergeFromCoreSize
- */
- public HystrixConfigurationDefinition maximumSize(int maximumSize) {
- setMaximumSize(Integer.toString(maximumSize));
- return this;
- }
-
- /**
- * Queue size rejection threshold is an artificial max size at which rejections will occur even if maxQueueSize has
- * not been reached. This is done because the maxQueueSize of a blocking queue can not be dynamically changed and we
- * want to support dynamically changing the queue size that affects rejections.
- * <p>
- * This is used by HystrixCommand when queuing a thread for execution.
- */
- public HystrixConfigurationDefinition queueSizeRejectionThreshold(int queueSizeRejectionThreshold) {
- setQueueSizeRejectionThreshold(Integer.toString(queueSizeRejectionThreshold));
- return this;
- }
-
- /**
- * Duration of statistical rolling window in milliseconds. This is passed into HystrixRollingNumber inside each
- * HystrixThreadPoolMetrics instance.
- */
- public HystrixConfigurationDefinition threadPoolRollingNumberStatisticalWindowInMilliseconds(
- int threadPoolRollingNumberStatisticalWindowInMilliseconds) {
- setThreadPoolRollingNumberStatisticalWindowInMilliseconds(
- Integer.toString(threadPoolRollingNumberStatisticalWindowInMilliseconds));
- return this;
- }
-
- /**
- * Number of buckets the rolling statistical window is broken into. This is passed into HystrixRollingNumber inside
- * each HystrixThreadPoolMetrics instance.
- */
- public HystrixConfigurationDefinition threadPoolRollingNumberStatisticalWindowBuckets(
- int threadPoolRollingNumberStatisticalWindowBuckets) {
- setThreadPoolRollingNumberStatisticalWindowBuckets(Integer.toString(threadPoolRollingNumberStatisticalWindowBuckets));
- return this;
- }
-
- /**
- * Allows the configuration for maximumSize to take effect. That value can then be equal to, or higher, than
- * coreSize
- */
- public HystrixConfigurationDefinition allowMaximumSizeToDivergeFromCoreSize(boolean allowMaximumSizeToDivergeFromCoreSize) {
- setAllowMaximumSizeToDivergeFromCoreSize(Boolean.toString(allowMaximumSizeToDivergeFromCoreSize));
- return this;
- }
-
- /**
- * End of configuration.
- */
- public CircuitBreakerDefinition end() {
- return parent;
- }
-
-}
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/Model.java b/core/camel-core-model/src/main/java/org/apache/camel/model/Model.java
index 337018e0ab4..84d0792d95e 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/Model.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/Model.java
@@ -305,37 +305,6 @@ public interface Model {
*/
void setValidators(List<ValidatorDefinition> validators);
- /**
- * Gets the Hystrix configuration by the given name. If no name is given the default configuration is returned, see
- * <tt>setHystrixConfiguration</tt>
- *
- * @param id id of the configuration, or <tt>null</tt> to return the default configuration
- * @return the configuration, or <tt>null</tt> if no configuration has been registered
- */
- HystrixConfigurationDefinition getHystrixConfiguration(String id);
-
- /**
- * Sets the default Hystrix configuration
- *
- * @param configuration the configuration
- */
- void setHystrixConfiguration(HystrixConfigurationDefinition configuration);
-
- /**
- * Sets the Hystrix configurations
- *
- * @param configurations the configuration list
- */
- void setHystrixConfigurations(List<HystrixConfigurationDefinition> configurations);
-
- /**
- * Adds the Hystrix configuration
- *
- * @param id name of the configuration
- * @param configuration the configuration
- */
- void addHystrixConfiguration(String id, HystrixConfigurationDefinition configuration);
-
/**
* Gets the Resilience4j configuration by the given name. If no name is given the default configuration is returned,
* see <tt>setResilience4jConfiguration</tt>
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index 09d0c8e4ba9..7bae96b6a41 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -61,7 +61,6 @@ import org.apache.camel.model.ContextScanDefinition;
import org.apache.camel.model.FaultToleranceConfigurationDefinition;
import org.apache.camel.model.FromDefinition;
import org.apache.camel.model.GlobalOptionsDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.IdentifiedType;
import org.apache.camel.model.InterceptDefinition;
import org.apache.camel.model.InterceptFromDefinition;
@@ -1100,10 +1099,6 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
public abstract List<ServiceCallConfigurationDefinition> getServiceCallConfigurations();
- public abstract HystrixConfigurationDefinition getDefaultHystrixConfiguration();
-
- public abstract List<HystrixConfigurationDefinition> getHystrixConfigurations();
-
public abstract Resilience4jConfigurationDefinition getDefaultResilience4jConfiguration();
public abstract List<Resilience4jConfigurationDefinition> getResilience4jConfigurations();
@@ -1251,14 +1246,6 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
context.addServiceCallConfiguration(bean.getId(), bean);
}
}
- if (getDefaultHystrixConfiguration() != null) {
- context.setHystrixConfiguration(getDefaultHystrixConfiguration());
- }
- if (getHystrixConfigurations() != null) {
- for (HystrixConfigurationDefinition bean : getHystrixConfigurations()) {
- context.addHystrixConfiguration(bean.getId(), bean);
- }
- }
if (getDefaultResilience4jConfiguration() != null) {
context.setResilience4jConfiguration(getDefaultResilience4jConfiguration());
}
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
index 9f4b5acef1a..da7da3a4b07 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
@@ -796,7 +796,7 @@ public abstract class BaseMainSupport extends BaseService {
// lookup and configure SPI beans
DefaultConfigurationConfigurer.afterConfigure(camelContext);
- // now configure context/hystrix/resilience4j/rest with additional properties
+ // now configure context/resilience4j/rest with additional properties
OrderedLocationProperties prop = (OrderedLocationProperties) camelContext.getPropertiesComponent()
.loadProperties(name -> name.startsWith("camel."), MainHelper::optionKey);
@@ -824,7 +824,6 @@ public abstract class BaseMainSupport extends BaseService {
}
OrderedLocationProperties contextProperties = new OrderedLocationProperties();
- OrderedLocationProperties hystrixProperties = new OrderedLocationProperties();
OrderedLocationProperties resilience4jProperties = new OrderedLocationProperties();
OrderedLocationProperties faultToleranceProperties = new OrderedLocationProperties();
OrderedLocationProperties restProperties = new OrderedLocationProperties();
@@ -844,12 +843,6 @@ public abstract class BaseMainSupport extends BaseService {
String option = key.substring(14);
validateOptionAndValue(key, option, value);
contextProperties.put(loc, optionKey(option), value);
- } else if (key.startsWith("camel.hystrix.")) {
- // grab the value
- String value = prop.getProperty(key);
- String option = key.substring(14);
- validateOptionAndValue(key, option, value);
- hystrixProperties.put(loc, optionKey(option), value);
} else if (key.startsWith("camel.resilience4j.")) {
// grab the value
String value = prop.getProperty(key);
@@ -984,7 +977,7 @@ public abstract class BaseMainSupport extends BaseService {
// configure which requires access to the model
MainSupportModelConfigurer.configureModelCamelContext(camelContext, mainConfigurationProperties,
- autoConfiguredProperties, hystrixProperties, resilience4jProperties, faultToleranceProperties);
+ autoConfiguredProperties, resilience4jProperties, faultToleranceProperties);
// log which options was not set
if (!beansProperties.isEmpty()) {
@@ -997,11 +990,6 @@ public abstract class BaseMainSupport extends BaseService {
LOG.warn("Property not auto-configured: camel.context.{}={}", k, v);
});
}
- if (!hystrixProperties.isEmpty()) {
- hystrixProperties.forEach((k, v) -> {
- LOG.warn("Property not auto-configured: camel.hystrix.{}={}", k, v);
- });
- }
if (!resilience4jProperties.isEmpty()) {
resilience4jProperties.forEach((k, v) -> {
LOG.warn("Property not auto-configured: camel.resilience4j.{}={}", k, v);
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/MainSupportModelConfigurer.java b/core/camel-main/src/main/java/org/apache/camel/main/MainSupportModelConfigurer.java
index e5c15494233..e1ca0b1d5f9 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/MainSupportModelConfigurer.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/MainSupportModelConfigurer.java
@@ -22,7 +22,6 @@ import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.ThreadPoolProfileBuilder;
import org.apache.camel.model.FaultToleranceConfigurationDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.ModelCamelContext;
import org.apache.camel.model.Resilience4jConfigurationDefinition;
import org.apache.camel.spi.ThreadPoolProfile;
@@ -48,28 +47,12 @@ public final class MainSupportModelConfigurer {
CamelContext camelContext,
MainConfigurationProperties mainConfigurationProperties,
OrderedLocationProperties autoConfiguredProperties,
- OrderedLocationProperties hystrixProperties,
OrderedLocationProperties resilience4jProperties,
OrderedLocationProperties faultToleranceProperties)
throws Exception {
ModelCamelContext model = camelContext.adapt(ModelCamelContext.class);
- if (!hystrixProperties.isEmpty() || mainConfigurationProperties.hasHystrixConfiguration()) {
- HystrixConfigurationProperties hystrix = mainConfigurationProperties.hystrix();
- LOG.debug("Auto-configuring Hystrix Circuit Breaker EIP from loaded properties: {}", hystrixProperties.size());
- setPropertiesOnTarget(camelContext, hystrix, hystrixProperties, "camel.hystrix.",
- mainConfigurationProperties.isAutoConfigurationFailFast(), true, autoConfiguredProperties);
- HystrixConfigurationDefinition hystrixModel = model.getHystrixConfiguration(null);
- if (hystrixModel == null) {
- hystrixModel = new HystrixConfigurationDefinition();
- model.setHystrixConfiguration(hystrixModel);
- }
- if (hystrix != null) {
- setPropertiesOnTarget(camelContext, hystrixModel, hystrix);
- }
- }
-
if (!resilience4jProperties.isEmpty() || mainConfigurationProperties.hasResilience4jConfiguration()) {
Resilience4jConfigurationProperties resilience4j = mainConfigurationProperties.resilience4j();
LOG.debug("Auto-configuring Resilience4j Circuit Breaker EIP from loaded properties: {}",
diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index 6b887d05ca6..76b21afef0d 100644
--- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -249,17 +249,12 @@ public class ModelParser extends BaseParser {
}, (def, key) -> {
switch (key) {
case "faultToleranceConfiguration": def.setFaultToleranceConfiguration(doParseFaultToleranceConfigurationDefinition()); break;
- case "hystrixConfiguration": def.setHystrixConfiguration(doParseHystrixConfigurationDefinition()); break;
case "resilience4jConfiguration": def.setResilience4jConfiguration(doParseResilience4jConfigurationDefinition()); break;
default: return outputDefinitionElementHandler().accept(def, key);
}
return true;
}, noValueHandler());
}
- protected HystrixConfigurationDefinition doParseHystrixConfigurationDefinition() throws IOException, XmlPullParserException {
- return doParse(new HystrixConfigurationDefinition(),
- hystrixConfigurationCommonAttributeHandler(), noElementHandler(), noValueHandler());
- }
protected Resilience4jConfigurationDefinition doParseResilience4jConfigurationDefinition() throws IOException, XmlPullParserException {
return doParse(new Resilience4jConfigurationDefinition(),
resilience4jConfigurationCommonAttributeHandler(), resilience4jConfigurationCommonElementHandler(), noValueHandler());
@@ -458,48 +453,6 @@ public class ModelParser extends BaseParser {
return false;
}, noValueHandler());
}
- protected <T extends HystrixConfigurationCommon> AttributeHandler<T> hystrixConfigurationCommonAttributeHandler() {
- return (def, key, val) -> {
- switch (key) {
- case "allowMaximumSizeToDivergeFromCoreSize": def.setAllowMaximumSizeToDivergeFromCoreSize(val); break;
- case "circuitBreakerEnabled": def.setCircuitBreakerEnabled(val); break;
- case "circuitBreakerErrorThresholdPercentage": def.setCircuitBreakerErrorThresholdPercentage(val); break;
- case "circuitBreakerForceClosed": def.setCircuitBreakerForceClosed(val); break;
- case "circuitBreakerForceOpen": def.setCircuitBreakerForceOpen(val); break;
- case "circuitBreakerRequestVolumeThreshold": def.setCircuitBreakerRequestVolumeThreshold(val); break;
- case "circuitBreakerSleepWindowInMilliseconds": def.setCircuitBreakerSleepWindowInMilliseconds(val); break;
- case "corePoolSize": def.setCorePoolSize(val); break;
- case "executionIsolationSemaphoreMaxConcurrentRequests": def.setExecutionIsolationSemaphoreMaxConcurrentRequests(val); break;
- case "executionIsolationStrategy": def.setExecutionIsolationStrategy(val); break;
- case "executionIsolationThreadInterruptOnTimeout": def.setExecutionIsolationThreadInterruptOnTimeout(val); break;
- case "executionTimeoutEnabled": def.setExecutionTimeoutEnabled(val); break;
- case "executionTimeoutInMilliseconds": def.setExecutionTimeoutInMilliseconds(val); break;
- case "fallbackEnabled": def.setFallbackEnabled(val); break;
- case "fallbackIsolationSemaphoreMaxConcurrentRequests": def.setFallbackIsolationSemaphoreMaxConcurrentRequests(val); break;
- case "groupKey": def.setGroupKey(val); break;
- case "keepAliveTime": def.setKeepAliveTime(val); break;
- case "maxQueueSize": def.setMaxQueueSize(val); break;
- case "maximumSize": def.setMaximumSize(val); break;
- case "metricsHealthSnapshotIntervalInMilliseconds": def.setMetricsHealthSnapshotIntervalInMilliseconds(val); break;
- case "metricsRollingPercentileBucketSize": def.setMetricsRollingPercentileBucketSize(val); break;
- case "metricsRollingPercentileEnabled": def.setMetricsRollingPercentileEnabled(val); break;
- case "metricsRollingPercentileWindowBuckets": def.setMetricsRollingPercentileWindowBuckets(val); break;
- case "metricsRollingPercentileWindowInMilliseconds": def.setMetricsRollingPercentileWindowInMilliseconds(val); break;
- case "metricsRollingStatisticalWindowBuckets": def.setMetricsRollingStatisticalWindowBuckets(val); break;
- case "metricsRollingStatisticalWindowInMilliseconds": def.setMetricsRollingStatisticalWindowInMilliseconds(val); break;
- case "queueSizeRejectionThreshold": def.setQueueSizeRejectionThreshold(val); break;
- case "requestLogEnabled": def.setRequestLogEnabled(val); break;
- case "threadPoolKey": def.setThreadPoolKey(val); break;
- case "threadPoolRollingNumberStatisticalWindowBuckets": def.setThreadPoolRollingNumberStatisticalWindowBuckets(val); break;
- case "threadPoolRollingNumberStatisticalWindowInMilliseconds": def.setThreadPoolRollingNumberStatisticalWindowInMilliseconds(val); break;
- default: return identifiedTypeAttributeHandler().accept(def, key, val);
- }
- return true;
- };
- }
- protected HystrixConfigurationCommon doParseHystrixConfigurationCommon() throws IOException, XmlPullParserException {
- return doParse(new HystrixConfigurationCommon(), hystrixConfigurationCommonAttributeHandler(), noElementHandler(), noValueHandler());
- }
protected IdempotentConsumerDefinition doParseIdempotentConsumerDefinition() throws IOException, XmlPullParserException {
return doParse(new IdempotentConsumerDefinition(), (def, key, val) -> {
switch (key) {
diff --git a/docs/components/modules/others/examples/json/hystrix.json b/docs/components/modules/others/examples/json/hystrix.json
deleted file mode 120000
index 0eea00b4ee0..00000000000
--- a/docs/components/modules/others/examples/json/hystrix.json
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../components/camel-hystrix/src/generated/resources/hystrix.json
\ No newline at end of file
diff --git a/docs/components/modules/others/nav.adoc b/docs/components/modules/others/nav.adoc
index 66768e721d8..a08b9c66c90 100644
--- a/docs/components/modules/others/nav.adoc
+++ b/docs/components/modules/others/nav.adoc
@@ -26,7 +26,6 @@
** xref:elytron.adoc[Elytron]
** xref:etcd3.adoc[Etcd3]
** xref:headersmap.adoc[Headersmap]
-** xref:hystrix.adoc[Hystrix]
** xref:jasypt.adoc[Jasypt]
** xref:jfr.adoc[JFR]
** xref:jta.adoc[JTA]
diff --git a/docs/components/modules/others/pages/hystrix.adoc b/docs/components/modules/others/pages/hystrix.adoc
deleted file mode 120000
index 7f4dcc22fb9..00000000000
--- a/docs/components/modules/others/pages/hystrix.adoc
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../components/camel-hystrix/src/main/docs/hystrix.adoc
\ No newline at end of file
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index 73c418251bc..5ab84b2a7f6 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -240,7 +240,6 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.MllpEndpointBuilderFactory.MllpBuilders,
org.apache.camel.builder.endpoint.dsl.MockEndpointBuilderFactory.MockBuilders,
org.apache.camel.builder.endpoint.dsl.MongoDbEndpointBuilderFactory.MongoDbBuilders,
- org.apache.camel.builder.endpoint.dsl.MsvEndpointBuilderFactory.MsvBuilders,
org.apache.camel.builder.endpoint.dsl.MustacheEndpointBuilderFactory.MustacheBuilders,
org.apache.camel.builder.endpoint.dsl.MvelEndpointBuilderFactory.MvelBuilders,
org.apache.camel.builder.endpoint.dsl.MyBatisBeanEndpointBuilderFactory.MyBatisBeanBuilders,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index bb06abce9a5..fb8b54ef42d 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -237,7 +237,6 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.MllpEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.MockEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.MongoDbEndpointBuilderFactory,
- org.apache.camel.builder.endpoint.dsl.MsvEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.MustacheEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.MvelEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.MyBatisBeanEndpointBuilderFactory,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 171d78488a5..475cfb6198f 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -10505,55 +10505,6 @@ public class StaticEndpointBuilders {
String path) {
return org.apache.camel.builder.endpoint.dsl.GridFsEndpointBuilderFactory.endpointBuilder(componentName, path);
}
- /**
- * MSV (camel-msv)
- * Validate XML payloads using Multi-Schema Validator (MSV).
- *
- * Category: validation
- * Since: 1.1
- * Maven coordinates: org.apache.camel:camel-msv
- *
- * Syntax: <code>msv:resourceUri</code>
- *
- * Path parameter: resourceUri (required)
- * URL to a local resource on the classpath, or a reference to lookup a bean
- * in the Registry, or a full URL to a remote resource or resource on the
- * file system which contains the XSD to validate against.
- *
- * @param path resourceUri
- * @return the dsl builder
- */
- @Deprecated
- public static org.apache.camel.builder.endpoint.dsl.MsvEndpointBuilderFactory.MsvEndpointBuilder msv(
- String path) {
- return org.apache.camel.builder.endpoint.dsl.MsvEndpointBuilderFactory.endpointBuilder("msv", path);
- }
- /**
- * MSV (camel-msv)
- * Validate XML payloads using Multi-Schema Validator (MSV).
- *
- * Category: validation
- * Since: 1.1
- * Maven coordinates: org.apache.camel:camel-msv
- *
- * Syntax: <code>msv:resourceUri</code>
- *
- * Path parameter: resourceUri (required)
- * URL to a local resource on the classpath, or a reference to lookup a bean
- * in the Registry, or a full URL to a remote resource or resource on the
- * file system which contains the XSD to validate against.
- *
- * @param componentName to use a custom component name for the endpoint
- * instead of the default name
- * @param path resourceUri
- * @return the dsl builder
- */
- @Deprecated
- public static org.apache.camel.builder.endpoint.dsl.MsvEndpointBuilderFactory.MsvEndpointBuilder msv(
- String componentName,
- String path) {
- return org.apache.camel.builder.endpoint.dsl.MsvEndpointBuilderFactory.endpointBuilder(componentName, path);
- }
/**
* Mustache (camel-mustache)
* Transform messages using a Mustache template.
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MsvEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MsvEndpointBuilderFactory.java
deleted file mode 100644
index 98e22f653f4..00000000000
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MsvEndpointBuilderFactory.java
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.builder.endpoint.dsl;
-
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.function.*;
-import java.util.stream.*;
-import javax.annotation.Generated;
-import org.apache.camel.builder.EndpointConsumerBuilder;
-import org.apache.camel.builder.EndpointProducerBuilder;
-import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
-
-/**
- * Validate XML payloads using Multi-Schema Validator (MSV).
- *
- * Generated by camel build tools - do NOT edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
-public interface MsvEndpointBuilderFactory {
-
-
- /**
- * Builder for endpoint for the MSV component.
- */
- public interface MsvEndpointBuilder extends EndpointProducerBuilder {
- default AdvancedMsvEndpointBuilder advanced() {
- return (AdvancedMsvEndpointBuilder) this;
- }
- /**
- * Whether to fail if no body exists.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: producer
- *
- * @param failOnNullBody the value to set
- * @return the dsl builder
- */
- default MsvEndpointBuilder failOnNullBody(boolean failOnNullBody) {
- doSetProperty("failOnNullBody", failOnNullBody);
- return this;
- }
- /**
- * Whether to fail if no body exists.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: true
- * Group: producer
- *
- * @param failOnNullBody the value to set
- * @return the dsl builder
- */
- default MsvEndpointBuilder failOnNullBody(String failOnNullBody) {
- doSetProperty("failOnNullBody", failOnNullBody);
- return this;
- }
- /**
- * Whether to fail if no header exists when validating against a header.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: producer
- *
- * @param failOnNullHeader the value to set
- * @return the dsl builder
- */
- default MsvEndpointBuilder failOnNullHeader(boolean failOnNullHeader) {
- doSetProperty("failOnNullHeader", failOnNullHeader);
- return this;
- }
- /**
- * Whether to fail if no header exists when validating against a header.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: true
- * Group: producer
- *
- * @param failOnNullHeader the value to set
- * @return the dsl builder
- */
- default MsvEndpointBuilder failOnNullHeader(String failOnNullHeader) {
- doSetProperty("failOnNullHeader", failOnNullHeader);
- return this;
- }
- /**
- * To validate against a header instead of the message body.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: producer
- *
- * @param headerName the value to set
- * @return the dsl builder
- */
- default MsvEndpointBuilder headerName(String headerName) {
- doSetProperty("headerName", headerName);
- return this;
- }
- /**
- * Whether the producer should be started lazy (on the first message).
- * By starting lazy you can use this to allow CamelContext and routes to
- * startup in situations where a producer may otherwise fail during
- * starting and cause the route to fail being started. By deferring this
- * startup to be lazy then the startup failure can be handled during
- * routing messages via Camel's routing error handlers. Beware that when
- * the first message is processed then creating and starting the
- * producer may take a little time and prolong the total processing time
- * of the processing.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: producer
- *
- * @param lazyStartProducer the value to set
- * @return the dsl builder
- */
- default MsvEndpointBuilder lazyStartProducer(boolean lazyStartProducer) {
- doSetProperty("lazyStartProducer", lazyStartProducer);
- return this;
- }
- /**
- * Whether the producer should be started lazy (on the first message).
- * By starting lazy you can use this to allow CamelContext and routes to
- * startup in situations where a producer may otherwise fail during
- * starting and cause the route to fail being started. By deferring this
- * startup to be lazy then the startup failure can be handled during
- * routing messages via Camel's routing error handlers. Beware that when
- * the first message is processed then creating and starting the
- * producer may take a little time and prolong the total processing time
- * of the processing.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: false
- * Group: producer
- *
- * @param lazyStartProducer the value to set
- * @return the dsl builder
- */
- default MsvEndpointBuilder lazyStartProducer(String lazyStartProducer) {
- doSetProperty("lazyStartProducer", lazyStartProducer);
- return this;
- }
- }
-
- /**
- * Advanced builder for endpoint for the MSV component.
- */
- public interface AdvancedMsvEndpointBuilder
- extends
- EndpointProducerBuilder {
- default MsvEndpointBuilder basic() {
- return (MsvEndpointBuilder) this;
- }
- /**
- * To use a custom
- * org.apache.camel.processor.validation.ValidatorErrorHandler. The
- * default error handler captures the errors and throws an exception.
- *
- * The option is a:
- * <code>org.apache.camel.support.processor.validation.ValidatorErrorHandler</code> type.
- *
- * Group: advanced
- *
- * @param errorHandler the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder errorHandler(
- org.apache.camel.support.processor.validation.ValidatorErrorHandler errorHandler) {
- doSetProperty("errorHandler", errorHandler);
- return this;
- }
- /**
- * To use a custom
- * org.apache.camel.processor.validation.ValidatorErrorHandler. The
- * default error handler captures the errors and throws an exception.
- *
- * The option will be converted to a
- * <code>org.apache.camel.support.processor.validation.ValidatorErrorHandler</code> type.
- *
- * Group: advanced
- *
- * @param errorHandler the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder errorHandler(String errorHandler) {
- doSetProperty("errorHandler", errorHandler);
- return this;
- }
- /**
- * To use a custom LSResourceResolver. Do not use together with
- * resourceResolverFactory.
- *
- * The option is a:
- * <code>org.w3c.dom.ls.LSResourceResolver</code> type.
- *
- * Group: advanced
- *
- * @param resourceResolver the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder resourceResolver(
- org.w3c.dom.ls.LSResourceResolver resourceResolver) {
- doSetProperty("resourceResolver", resourceResolver);
- return this;
- }
- /**
- * To use a custom LSResourceResolver. Do not use together with
- * resourceResolverFactory.
- *
- * The option will be converted to a
- * <code>org.w3c.dom.ls.LSResourceResolver</code> type.
- *
- * Group: advanced
- *
- * @param resourceResolver the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder resourceResolver(
- String resourceResolver) {
- doSetProperty("resourceResolver", resourceResolver);
- return this;
- }
- /**
- * To use a custom LSResourceResolver which depends on a dynamic
- * endpoint resource URI. The default resource resolver factory resturns
- * a resource resolver which can read files from the class path and file
- * system. Do not use together with resourceResolver.
- *
- * The option is a:
- * <code>org.apache.camel.component.validator.ValidatorResourceResolverFactory</code> type.
- *
- * Group: advanced
- *
- * @param resourceResolverFactory the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder resourceResolverFactory(
- org.apache.camel.component.validator.ValidatorResourceResolverFactory resourceResolverFactory) {
- doSetProperty("resourceResolverFactory", resourceResolverFactory);
- return this;
- }
- /**
- * To use a custom LSResourceResolver which depends on a dynamic
- * endpoint resource URI. The default resource resolver factory resturns
- * a resource resolver which can read files from the class path and file
- * system. Do not use together with resourceResolver.
- *
- * The option will be converted to a
- * <code>org.apache.camel.component.validator.ValidatorResourceResolverFactory</code> type.
- *
- * Group: advanced
- *
- * @param resourceResolverFactory the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder resourceResolverFactory(
- String resourceResolverFactory) {
- doSetProperty("resourceResolverFactory", resourceResolverFactory);
- return this;
- }
- /**
- * To use a custom javax.xml.validation.SchemaFactory.
- *
- * The option is a:
- * <code>javax.xml.validation.SchemaFactory</code> type.
- *
- * Group: advanced
- *
- * @param schemaFactory the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder schemaFactory(
- javax.xml.validation.SchemaFactory schemaFactory) {
- doSetProperty("schemaFactory", schemaFactory);
- return this;
- }
- /**
- * To use a custom javax.xml.validation.SchemaFactory.
- *
- * The option will be converted to a
- * <code>javax.xml.validation.SchemaFactory</code> type.
- *
- * Group: advanced
- *
- * @param schemaFactory the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder schemaFactory(String schemaFactory) {
- doSetProperty("schemaFactory", schemaFactory);
- return this;
- }
- /**
- * Configures the W3C XML Schema Namespace URI.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Default: http://www.w3.org/2001/XMLSchema
- * Group: advanced
- *
- * @param schemaLanguage the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder schemaLanguage(String schemaLanguage) {
- doSetProperty("schemaLanguage", schemaLanguage);
- return this;
- }
- /**
- * Whether the Schema instance should be shared or not. This option is
- * introduced to work around a JDK 1.6.x bug. Xerces should not have
- * this issue.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: advanced
- *
- * @param useSharedSchema the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder useSharedSchema(
- boolean useSharedSchema) {
- doSetProperty("useSharedSchema", useSharedSchema);
- return this;
- }
- /**
- * Whether the Schema instance should be shared or not. This option is
- * introduced to work around a JDK 1.6.x bug. Xerces should not have
- * this issue.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: true
- * Group: advanced
- *
- * @param useSharedSchema the value to set
- * @return the dsl builder
- */
- default AdvancedMsvEndpointBuilder useSharedSchema(
- String useSharedSchema) {
- doSetProperty("useSharedSchema", useSharedSchema);
- return this;
- }
- }
-
- public interface MsvBuilders {
- /**
- * MSV (camel-msv)
- * Validate XML payloads using Multi-Schema Validator (MSV).
- *
- * Category: validation
- * Since: 1.1
- * Maven coordinates: org.apache.camel:camel-msv
- *
- * Syntax: <code>msv:resourceUri</code>
- *
- * Path parameter: resourceUri (required)
- * URL to a local resource on the classpath, or a reference to lookup a
- * bean in the Registry, or a full URL to a remote resource or resource
- * on the file system which contains the XSD to validate against.
- *
- * @param path resourceUri
- * @return the dsl builder
- */
- @Deprecated
- default MsvEndpointBuilder msv(String path) {
- return MsvEndpointBuilderFactory.endpointBuilder("msv", path);
- }
- /**
- * MSV (camel-msv)
- * Validate XML payloads using Multi-Schema Validator (MSV).
- *
- * Category: validation
- * Since: 1.1
- * Maven coordinates: org.apache.camel:camel-msv
- *
- * Syntax: <code>msv:resourceUri</code>
- *
- * Path parameter: resourceUri (required)
- * URL to a local resource on the classpath, or a reference to lookup a
- * bean in the Registry, or a full URL to a remote resource or resource
- * on the file system which contains the XSD to validate against.
- *
- * @param componentName to use a custom component name for the endpoint
- * instead of the default name
- * @param path resourceUri
- * @return the dsl builder
- */
- @Deprecated
- default MsvEndpointBuilder msv(String componentName, String path) {
- return MsvEndpointBuilderFactory.endpointBuilder(componentName, path);
- }
- }
- @Deprecated
- static MsvEndpointBuilder endpointBuilder(String componentName, String path) {
- class MsvEndpointBuilderImpl extends AbstractEndpointBuilder implements MsvEndpointBuilder, AdvancedMsvEndpointBuilder {
- public MsvEndpointBuilderImpl(String path) {
- super(componentName, path);
- }
- }
- return new MsvEndpointBuilderImpl(path);
- }
-}
\ No newline at end of file
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index 4e7ad4b15f3..12a5b583a78 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -31,7 +31,6 @@ import org.apache.camel.model.FilterDefinition;
import org.apache.camel.model.FinallyDefinition;
import org.apache.camel.model.GlobalOptionDefinition;
import org.apache.camel.model.GlobalOptionsDefinition;
-import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.IdempotentConsumerDefinition;
import org.apache.camel.model.InOnlyDefinition;
import org.apache.camel.model.InOutDefinition;
@@ -1744,7 +1743,6 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
@YamlProperty(name = "configuration", type = "string"),
@YamlProperty(name = "description", type = "string"),
@YamlProperty(name = "fault-tolerance-configuration", type = "object:org.apache.camel.model.FaultToleranceConfigurationDefinition"),
- @YamlProperty(name = "hystrix-configuration", type = "object:org.apache.camel.model.HystrixConfigurationDefinition"),
@YamlProperty(name = "id", type = "string"),
@YamlProperty(name = "inherit-error-handler", type = "boolean"),
@YamlProperty(name = "on-fallback", type = "object:org.apache.camel.model.OnFallbackDefinition"),
@@ -1776,11 +1774,6 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
target.setFaultToleranceConfiguration(val);
break;
}
- case "hystrix-configuration": {
- org.apache.camel.model.HystrixConfigurationDefinition val = asType(node, org.apache.camel.model.HystrixConfigurationDefinition.class);
- target.setHystrixConfiguration(val);
- break;
- }
case "inherit-error-handler": {
String val = asText(node);
target.setInheritErrorHandler(java.lang.Boolean.valueOf(val));
@@ -6177,230 +6170,6 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
}
}
- @YamlType(
- types = org.apache.camel.model.HystrixConfigurationDefinition.class,
- order = org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1,
- nodes = {
- "hystrix-configuration",
- "hystrixConfiguration"
- },
- properties = {
- @YamlProperty(name = "allow-maximum-size-to-diverge-from-core-size", type = "boolean"),
- @YamlProperty(name = "circuit-breaker-enabled", type = "boolean"),
- @YamlProperty(name = "circuit-breaker-error-threshold-percentage", type = "number"),
- @YamlProperty(name = "circuit-breaker-force-closed", type = "boolean"),
- @YamlProperty(name = "circuit-breaker-force-open", type = "boolean"),
- @YamlProperty(name = "circuit-breaker-request-volume-threshold", type = "number"),
- @YamlProperty(name = "circuit-breaker-sleep-window-in-milliseconds", type = "number"),
- @YamlProperty(name = "core-pool-size", type = "number"),
- @YamlProperty(name = "execution-isolation-semaphore-max-concurrent-requests", type = "number"),
- @YamlProperty(name = "execution-isolation-strategy", type = "string"),
- @YamlProperty(name = "execution-isolation-thread-interrupt-on-timeout", type = "boolean"),
- @YamlProperty(name = "execution-timeout-enabled", type = "boolean"),
- @YamlProperty(name = "execution-timeout-in-milliseconds", type = "number"),
- @YamlProperty(name = "fallback-enabled", type = "boolean"),
- @YamlProperty(name = "fallback-isolation-semaphore-max-concurrent-requests", type = "number"),
- @YamlProperty(name = "group-key", type = "string"),
- @YamlProperty(name = "id", type = "string"),
- @YamlProperty(name = "keep-alive-time", type = "number"),
- @YamlProperty(name = "max-queue-size", type = "number"),
- @YamlProperty(name = "maximum-size", type = "number"),
- @YamlProperty(name = "metrics-health-snapshot-interval-in-milliseconds", type = "number"),
- @YamlProperty(name = "metrics-rolling-percentile-bucket-size", type = "number"),
- @YamlProperty(name = "metrics-rolling-percentile-enabled", type = "boolean"),
- @YamlProperty(name = "metrics-rolling-percentile-window-buckets", type = "number"),
- @YamlProperty(name = "metrics-rolling-percentile-window-in-milliseconds", type = "number"),
- @YamlProperty(name = "metrics-rolling-statistical-window-buckets", type = "number"),
- @YamlProperty(name = "metrics-rolling-statistical-window-in-milliseconds", type = "number"),
- @YamlProperty(name = "queue-size-rejection-threshold", type = "number"),
- @YamlProperty(name = "request-log-enabled", type = "boolean"),
- @YamlProperty(name = "thread-pool-key", type = "string"),
- @YamlProperty(name = "thread-pool-rolling-number-statistical-window-buckets", type = "number"),
- @YamlProperty(name = "thread-pool-rolling-number-statistical-window-in-milliseconds", type = "number")
- }
- )
- public static class HystrixConfigurationDefinitionDeserializer extends YamlDeserializerBase<HystrixConfigurationDefinition> {
- public HystrixConfigurationDefinitionDeserializer() {
- super(HystrixConfigurationDefinition.class);
- }
-
- @Override
- protected HystrixConfigurationDefinition newInstance() {
- return new HystrixConfigurationDefinition();
- }
-
- @Override
- protected boolean setProperty(HystrixConfigurationDefinition target, String propertyKey,
- String propertyName, Node node) {
- switch(propertyKey) {
- case "allow-maximum-size-to-diverge-from-core-size": {
- String val = asText(node);
- target.setAllowMaximumSizeToDivergeFromCoreSize(val);
- break;
- }
- case "circuit-breaker-enabled": {
- String val = asText(node);
- target.setCircuitBreakerEnabled(val);
- break;
- }
- case "circuit-breaker-error-threshold-percentage": {
- String val = asText(node);
- target.setCircuitBreakerErrorThresholdPercentage(val);
- break;
- }
- case "circuit-breaker-force-closed": {
- String val = asText(node);
- target.setCircuitBreakerForceClosed(val);
- break;
- }
- case "circuit-breaker-force-open": {
- String val = asText(node);
- target.setCircuitBreakerForceOpen(val);
- break;
- }
- case "circuit-breaker-request-volume-threshold": {
- String val = asText(node);
- target.setCircuitBreakerRequestVolumeThreshold(val);
- break;
- }
- case "circuit-breaker-sleep-window-in-milliseconds": {
- String val = asText(node);
- target.setCircuitBreakerSleepWindowInMilliseconds(val);
- break;
- }
- case "core-pool-size": {
- String val = asText(node);
- target.setCorePoolSize(val);
- break;
- }
- case "execution-isolation-semaphore-max-concurrent-requests": {
- String val = asText(node);
- target.setExecutionIsolationSemaphoreMaxConcurrentRequests(val);
- break;
- }
- case "execution-isolation-strategy": {
- String val = asText(node);
- target.setExecutionIsolationStrategy(val);
- break;
- }
- case "execution-isolation-thread-interrupt-on-timeout": {
- String val = asText(node);
- target.setExecutionIsolationThreadInterruptOnTimeout(val);
- break;
- }
- case "execution-timeout-enabled": {
- String val = asText(node);
- target.setExecutionTimeoutEnabled(val);
- break;
- }
- case "execution-timeout-in-milliseconds": {
- String val = asText(node);
- target.setExecutionTimeoutInMilliseconds(val);
- break;
- }
- case "fallback-enabled": {
- String val = asText(node);
- target.setFallbackEnabled(val);
- break;
- }
- case "fallback-isolation-semaphore-max-concurrent-requests": {
- String val = asText(node);
- target.setFallbackIsolationSemaphoreMaxConcurrentRequests(val);
- break;
- }
- case "group-key": {
- String val = asText(node);
- target.setGroupKey(val);
- break;
- }
- case "id": {
- String val = asText(node);
- target.setId(val);
- break;
- }
- case "keep-alive-time": {
- String val = asText(node);
- target.setKeepAliveTime(val);
- break;
- }
- case "max-queue-size": {
- String val = asText(node);
- target.setMaxQueueSize(val);
- break;
- }
- case "maximum-size": {
- String val = asText(node);
- target.setMaximumSize(val);
- break;
- }
- case "metrics-health-snapshot-interval-in-milliseconds": {
- String val = asText(node);
- target.setMetricsHealthSnapshotIntervalInMilliseconds(val);
- break;
- }
- case "metrics-rolling-percentile-bucket-size": {
- String val = asText(node);
- target.setMetricsRollingPercentileBucketSize(val);
- break;
- }
- case "metrics-rolling-percentile-enabled": {
- String val = asText(node);
- target.setMetricsRollingPercentileEnabled(val);
- break;
- }
- case "metrics-rolling-percentile-window-buckets": {
- String val = asText(node);
- target.setMetricsRollingPercentileWindowBuckets(val);
- break;
- }
- case "metrics-rolling-percentile-window-in-milliseconds": {
- String val = asText(node);
- target.setMetricsRollingPercentileWindowInMilliseconds(val);
- break;
- }
- case "metrics-rolling-statistical-window-buckets": {
- String val = asText(node);
- target.setMetricsRollingStatisticalWindowBuckets(val);
- break;
- }
- case "metrics-rolling-statistical-window-in-milliseconds": {
- String val = asText(node);
- target.setMetricsRollingStatisticalWindowInMilliseconds(val);
- break;
- }
- case "queue-size-rejection-threshold": {
- String val = asText(node);
- target.setQueueSizeRejectionThreshold(val);
- break;
- }
- case "request-log-enabled": {
- String val = asText(node);
- target.setRequestLogEnabled(val);
- break;
- }
- case "thread-pool-key": {
- String val = asText(node);
- target.setThreadPoolKey(val);
- break;
- }
- case "thread-pool-rolling-number-statistical-window-buckets": {
- String val = asText(node);
- target.setThreadPoolRollingNumberStatisticalWindowBuckets(val);
- break;
- }
- case "thread-pool-rolling-number-statistical-window-in-milliseconds": {
- String val = asText(node);
- target.setThreadPoolRollingNumberStatisticalWindowInMilliseconds(val);
- break;
- }
- default: {
- return false;
- }
- }
- return true;
- }
- }
-
@YamlType(
types = org.apache.camel.model.dataformat.IcalDataFormat.class,
order = org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1,
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
index 9c30cae98b7..98d2e68933c 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
@@ -175,9 +175,6 @@ public final class ModelDeserializersResolver implements YamlDeserializerResolve
case "org.apache.camel.model.cloud.HealthyServiceCallServiceFilterConfiguration": return new ModelDeserializers.HealthyServiceCallServiceFilterConfigurationDeserializer();
case "hl7terser": return new ModelDeserializers.Hl7TerserExpressionDeserializer();
case "org.apache.camel.model.language.Hl7TerserExpression": return new ModelDeserializers.Hl7TerserExpressionDeserializer();
- case "hystrix-configuration": return new ModelDeserializers.HystrixConfigurationDefinitionDeserializer();
- case "hystrixConfiguration": return new ModelDeserializers.HystrixConfigurationDefinitionDeserializer();
- case "org.apache.camel.model.HystrixConfigurationDefinition": return new ModelDeserializers.HystrixConfigurationDefinitionDeserializer();
case "ical": return new ModelDeserializers.IcalDataFormatDeserializer();
case "org.apache.camel.model.dataformat.IcalDataFormat": return new ModelDeserializers.IcalDataFormatDeserializer();
case "idempotent-consumer": return new ModelDeserializers.IdempotentConsumerDefinitionDeserializer();
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
index 23d1078612d..55307a6b77e 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
@@ -651,9 +651,6 @@
"fault-tolerance-configuration" : {
"$ref" : "#/items/definitions/org.apache.camel.model.FaultToleranceConfigurationDefinition"
},
- "hystrix-configuration" : {
- "$ref" : "#/items/definitions/org.apache.camel.model.HystrixConfigurationDefinition"
- },
"id" : {
"type" : "string"
},
@@ -1082,107 +1079,6 @@
}
}
},
- "org.apache.camel.model.HystrixConfigurationDefinition" : {
- "type" : "object",
- "properties" : {
- "allow-maximum-size-to-diverge-from-core-size" : {
- "type" : "boolean"
- },
- "circuit-breaker-enabled" : {
- "type" : "boolean"
- },
- "circuit-breaker-error-threshold-percentage" : {
- "type" : "number"
- },
- "circuit-breaker-force-closed" : {
- "type" : "boolean"
- },
- "circuit-breaker-force-open" : {
- "type" : "boolean"
- },
- "circuit-breaker-request-volume-threshold" : {
- "type" : "number"
- },
- "circuit-breaker-sleep-window-in-milliseconds" : {
- "type" : "number"
- },
- "core-pool-size" : {
- "type" : "number"
- },
- "execution-isolation-semaphore-max-concurrent-requests" : {
- "type" : "number"
- },
- "execution-isolation-strategy" : {
- "type" : "string"
- },
- "execution-isolation-thread-interrupt-on-timeout" : {
- "type" : "boolean"
- },
- "execution-timeout-enabled" : {
- "type" : "boolean"
- },
- "execution-timeout-in-milliseconds" : {
- "type" : "number"
- },
- "fallback-enabled" : {
- "type" : "boolean"
- },
- "fallback-isolation-semaphore-max-concurrent-requests" : {
- "type" : "number"
- },
- "group-key" : {
- "type" : "string"
- },
- "id" : {
- "type" : "string"
- },
- "keep-alive-time" : {
- "type" : "number"
- },
- "max-queue-size" : {
- "type" : "number"
- },
- "maximum-size" : {
- "type" : "number"
- },
- "metrics-health-snapshot-interval-in-milliseconds" : {
- "type" : "number"
- },
- "metrics-rolling-percentile-bucket-size" : {
- "type" : "number"
- },
- "metrics-rolling-percentile-enabled" : {
- "type" : "boolean"
- },
- "metrics-rolling-percentile-window-buckets" : {
- "type" : "number"
- },
- "metrics-rolling-percentile-window-in-milliseconds" : {
- "type" : "number"
- },
- "metrics-rolling-statistical-window-buckets" : {
- "type" : "number"
- },
- "metrics-rolling-statistical-window-in-milliseconds" : {
- "type" : "number"
- },
- "queue-size-rejection-threshold" : {
- "type" : "number"
- },
- "request-log-enabled" : {
- "type" : "boolean"
- },
- "thread-pool-key" : {
- "type" : "string"
- },
- "thread-pool-rolling-number-statistical-window-buckets" : {
- "type" : "number"
- },
- "thread-pool-rolling-number-statistical-window-in-milliseconds" : {
- "type" : "number"
- }
- }
- },
"org.apache.camel.model.IdempotentConsumerDefinition" : {
"type" : "object",
"anyOf" : [ {
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
index afba13c54a3..2e8efc36b90 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
@@ -558,9 +558,6 @@
"faultToleranceConfiguration" : {
"$ref" : "#/items/definitions/org.apache.camel.model.FaultToleranceConfigurationDefinition"
},
- "hystrixConfiguration" : {
- "$ref" : "#/items/definitions/org.apache.camel.model.HystrixConfigurationDefinition"
- },
"id" : {
"type" : "string"
},
@@ -986,107 +983,6 @@
}
}
},
- "org.apache.camel.model.HystrixConfigurationDefinition" : {
- "type" : "object",
- "properties" : {
- "allowMaximumSizeToDivergeFromCoreSize" : {
- "type" : "boolean"
- },
- "circuitBreakerEnabled" : {
- "type" : "boolean"
- },
- "circuitBreakerErrorThresholdPercentage" : {
- "type" : "number"
- },
- "circuitBreakerForceClosed" : {
- "type" : "boolean"
- },
- "circuitBreakerForceOpen" : {
- "type" : "boolean"
- },
- "circuitBreakerRequestVolumeThreshold" : {
- "type" : "number"
- },
- "circuitBreakerSleepWindowInMilliseconds" : {
- "type" : "number"
- },
- "corePoolSize" : {
- "type" : "number"
- },
- "executionIsolationSemaphoreMaxConcurrentRequests" : {
- "type" : "number"
- },
- "executionIsolationStrategy" : {
- "type" : "string"
- },
- "executionIsolationThreadInterruptOnTimeout" : {
- "type" : "boolean"
- },
- "executionTimeoutEnabled" : {
- "type" : "boolean"
- },
- "executionTimeoutInMilliseconds" : {
- "type" : "number"
- },
- "fallbackEnabled" : {
- "type" : "boolean"
- },
- "fallbackIsolationSemaphoreMaxConcurrentRequests" : {
- "type" : "number"
- },
- "groupKey" : {
- "type" : "string"
- },
- "id" : {
- "type" : "string"
- },
- "keepAliveTime" : {
- "type" : "number"
- },
- "maxQueueSize" : {
- "type" : "number"
- },
- "maximumSize" : {
- "type" : "number"
- },
- "metricsHealthSnapshotIntervalInMilliseconds" : {
- "type" : "number"
- },
- "metricsRollingPercentileBucketSize" : {
- "type" : "number"
- },
- "metricsRollingPercentileEnabled" : {
- "type" : "boolean"
- },
- "metricsRollingPercentileWindowBuckets" : {
- "type" : "number"
- },
- "metricsRollingPercentileWindowInMilliseconds" : {
- "type" : "number"
- },
- "metricsRollingStatisticalWindowBuckets" : {
- "type" : "number"
- },
- "metricsRollingStatisticalWindowInMilliseconds" : {
- "type" : "number"
- },
- "queueSizeRejectionThreshold" : {
- "type" : "number"
- },
- "requestLogEnabled" : {
- "type" : "boolean"
- },
- "threadPoolKey" : {
- "type" : "string"
- },
- "threadPoolRollingNumberStatisticalWindowBuckets" : {
- "type" : "number"
- },
- "threadPoolRollingNumberStatisticalWindowInMilliseconds" : {
- "type" : "number"
- }
- }
- },
"org.apache.camel.model.IdempotentConsumerDefinition" : {
"type" : "object",
"anyOf" : [ {
diff --git a/parent/pom.xml b/parent/pom.xml
index d64a199d66d..855d27e2658 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -244,7 +244,6 @@
<httpasyncclient-version>4.1.5</httpasyncclient-version>
<huaweicloud-obs-version>3.21.4.1</huaweicloud-obs-version>
<huaweicloud-sdk-version>3.0.76</huaweicloud-sdk-version>
- <hystrix-version>1.5.18</hystrix-version>
<ical4j-version>1.0.7</ical4j-version>
<icu4j-version>70.1</icu4j-version>
<ignite-version>2.12.0</ignite-version>
@@ -1606,11 +1605,6 @@
<artifactId>camel-huaweicloud-smn</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-hystrix</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ical</artifactId>