This is an automated email from the ASF dual-hosted git repository.
davsclaus 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 0b9b5dc62815 CAMEL-27989: camel-resilience4j - the config option is
now used as the base circuit breaker config (#31226)
0b9b5dc62815 is described below
commit 0b9b5dc6281571f365dc8faf8f45198884350fb2
Author: Adriano Machado <[email protected]>
AuthorDate: Wed Dec 2 15:35:51 2026 -0500
CAMEL-27989: camel-resilience4j - the config option is now used as the base
circuit breaker config (#31226)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---
.../org/apache/camel/catalog/docs/main.adoc | 2 +-
.../main/camel-main-configuration-metadata.json | 2 +-
.../catalog/models/resilience4jConfiguration.json | 2 +-
.../apache/camel/catalog/schemas/camel-spring.xsd | 6 +-
.../apache/camel/catalog/schemas/camel-xml-io.xsd | 6 +-
.../camel/catalog/schemas/camelYamlDsl-model.json | 2 +-
.../component/resilience4j/ResilienceReifier.java | 37 +++-
.../ResilienceCircuitBreakerConfigTest.java | 199 +++++++++++++++++++++
.../camel/model/resilience4jConfiguration.json | 2 +-
.../model/Resilience4jConfigurationCommon.java | 5 +-
.../model/Resilience4jConfigurationDefinition.java | 6 +-
.../camel-main-configuration-metadata.json | 2 +-
core/camel-main/src/main/docs/main.adoc | 2 +-
.../main/Resilience4jConfigurationProperties.java | 8 +-
.../ROOT/pages/camel-4x-upgrade-guide-4_25.adoc | 22 +++
.../dsl/yaml/deserializers/ModelDeserializers.java | 2 +-
.../resources/schema/camelYamlDsl-canonical.json | 2 +-
.../resources/schema/camelYamlDsl-model.json | 2 +-
.../generated/resources/schema/camelYamlDsl.json | 2 +-
19 files changed, 290 insertions(+), 21 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/main.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/main.adoc
index 08ace29d5bcd..a9fe8bf2357b 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/main.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/main.adoc
@@ -757,7 +757,7 @@ The camel.resilience4j supports 25 options, which are
listed below.
| `camel.resilience4j.bulkheadMaxConcurrentCalls` | The maximum number of
concurrent calls that the bulkhead lets through, when bulkheadEnabled is true.
When not set, Resilience4j uses 25. | | Integer
| `camel.resilience4j.bulkheadMaxWaitDuration` | Configures a maximum amount
of time which the calling thread will wait to enter the bulkhead. Accepts Camel
duration expressions (e.g. 500ms, 1s) or millisecond values. Default is 0 (no
waiting). | | String
| `camel.resilience4j.circuitBreaker` | Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use. | | String
-| `camel.resilience4j.config` | Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance in the
registry. Not used at present: camel-resilience4j builds the configuration from
the other options. | | String
+| `camel.resilience4j.config` | Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applied on top of it. When
recordExceptions or ignoreExceptions are also set, they replace a custom record
or ignore exception predicate of the referenced config instead of combining
with it, while its exception classes are kept. Whe [...]
| `camel.resilience4j.failureRateThreshold` | Configures the failure rate
threshold in percentage. If the failure rate is equal or greater than the
threshold the CircuitBreaker transitions to open and starts short-circuiting
calls. The threshold must be greater than 0 and not greater than 100. Default
value is 50 percentage. | 50 | Float
| `camel.resilience4j.maxWaitDurationInHalfOpenState` | Configures the maximum
wait duration which controls how long the CircuitBreaker should stay in Half
Open state, before it switches to open. Value 0 means circuit breaker will wait
in half open state until all permitted calls have been completed. Accepts Camel
duration expressions (e.g. 10s, 1m) or millisecond values. | 0 | String
| `camel.resilience4j.micrometerEnabled` | Whether to enable collecting
statistics using Micrometer. This requires adding camel-resilience4j-micrometer
JAR to the classpath. | false | Boolean
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 5fe541dee5c3..0db9a6f15fd5 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -379,7 +379,7 @@
{ "name": "camel.resilience4j.bulkheadMaxConcurrentCalls", "required":
false, "description": "The maximum number of concurrent calls that the bulkhead
lets through, when bulkheadEnabled is true. When not set, Resilience4j uses
25.", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer",
"javaType": "java.lang.Integer", "secret": false },
{ "name": "camel.resilience4j.bulkheadMaxWaitDuration", "required": false,
"description": "Configures a maximum amount of time which the calling thread
will wait to enter the bulkhead. Accepts Camel duration expressions (e.g.
500ms, 1s) or millisecond values. Default is 0 (no waiting).", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "string",
"javaType": "java.lang.String", "secret": false },
{ "name": "camel.resilience4j.circuitBreaker", "required": false,
"description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use.", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "string",
"javaType": "java.lang.String", "secret": false },
- { "name": "camel.resilience4j.config", "required": false, "description":
"Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance in the
registry. Not used at present: camel-resilience4j builds the configuration from
the other options.", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "string",
"javaType": "java.lang.String", "secret": false },
+ { "name": "camel.resilience4j.config", "required": false, "description":
"Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applied on top of it. When
recordExceptions or ignoreExceptions are also set, they replace a custom record
or ignore exception predicate of the referenced config instead of combining
with [...]
{ "name": "camel.resilience4j.failureRateThreshold", "required": false,
"description": "Configures the failure rate threshold in percentage. If the
failure rate is equal or greater than the threshold the CircuitBreaker
transitions to open and starts short-circuiting calls. The threshold must be
greater than 0 and not greater than 100. Default value is 50 percentage.",
"sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties",
"type": "number", "javaType": "java.lang.F [...]
{ "name": "camel.resilience4j.maxWaitDurationInHalfOpenState", "required":
false, "description": "Configures the maximum wait duration which controls how
long the CircuitBreaker should stay in Half Open state, before it switches to
open. Value 0 means circuit breaker will wait in half open state until all
permitted calls have been completed. Accepts Camel duration expressions (e.g.
10s, 1m) or millisecond values.", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationPropert [...]
{ "name": "camel.resilience4j.micrometerEnabled", "required": false,
"description": "Whether to enable collecting statistics using Micrometer. This
requires adding camel-resilience4j-micrometer JAR to the classpath.",
"sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties",
"type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": false,
"secret": false },
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resilience4jConfiguration.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resilience4jConfiguration.json
index 0ac5b7b290fc..6ee64cd40d9b 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resilience4jConfiguration.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resilience4jConfiguration.json
@@ -14,7 +14,7 @@
"properties": {
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
"circuitBreaker": { "index": 1, "kind": "attribute", "displayName":
"Circuit Breaker", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use." },
- "config": { "index": 2, "kind": "attribute", "displayName": "Config",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry." },
+ "config": { "index": 2, "kind": "attribute", "displayName": "Config",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applie [...]
"failureRateThreshold": { "index": 3, "kind": "attribute", "displayName":
"Failure Rate Threshold", "group": "common", "required": false, "type":
"number", "javaType": "java.lang.Float", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "50", "description": "Configures the
failure rate threshold in percentage. If the failure rate is equal or greater
than the threshold the CircuitBreaker transitions to open and starts
short-circuiting calls." },
"permittedNumberOfCallsInHalfOpenState": { "index": 4, "kind":
"attribute", "displayName": "Permitted Number Of Calls In Half Open State",
"group": "advanced", "label": "advanced", "required": false, "type": "integer",
"javaType": "java.lang.Integer", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 10, "description": "Configures the number of
permitted calls when the CircuitBreaker is half open." },
"throwExceptionWhenHalfOpenOrOpenState": { "index": 5, "kind":
"attribute", "displayName": "Throw Exception When Half Open Or Open State",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether to throw
io.github.resilience4j.circuitbreaker.CallNotPermittedException when the call
is rejected because the circuit breaker is half open or open." },
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 84f1018a07b4..f7e56130cba5 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
@@ -4627,7 +4627,11 @@ When using this, then any other circuit breaker options
are not in use.
<xs:documentation xml:lang="en">
<![CDATA[
Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the
-registry.
+registry. It is used as the base configuration, and the other circuit breaker
options that are configured are applied on
+top of it. When recordExceptions or ignoreExceptions are also set, they
replace a custom record or ignore exception
+predicate of the referenced config instead of combining with it, while its
exception classes are kept. When the
+circuitBreaker option is also set, that circuit breaker keeps its own
configuration, and only the record and ignore
+exceptions of this config decide whether the fallback runs.
]]>
</xs:documentation>
</xs:annotation>
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
index b7b5d82c3b59..31f72b64936a 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
@@ -3733,7 +3733,11 @@ When using this, then any other circuit breaker options
are not in use.
<xs:documentation xml:lang="en">
<![CDATA[
Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the
-registry.
+registry. It is used as the base configuration, and the other circuit breaker
options that are configured are applied on
+top of it. When recordExceptions or ignoreExceptions are also set, they
replace a custom record or ignore exception
+predicate of the referenced config instead of combining with it, while its
exception classes are kept. When the
+circuitBreaker option is also set, that circuit breaker keeps its own
configuration, and only the record and ignore
+exceptions of this config decide whether the fallback runs.
]]>
</xs:documentation>
</xs:annotation>
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json
index 9c703d567124..8717740cae4f 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json
@@ -6278,7 +6278,7 @@
}, {
"name" : "config",
"type" : "string",
- "description" : "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry.",
+ "description" : "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applied on top of it. When
recordExceptions or ignoreExceptions are also set, they replace a custom record
or ignore exception predicate of the referenced config instead of combining
with it, while its exception classes are kept. When the c [...]
"title" : "Config",
"displayName" : "Config",
"kind" : "attribute",
diff --git
a/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceReifier.java
b/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceReifier.java
index bab075f5c238..0e732fc60551 100644
---
a/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceReifier.java
+++
b/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceReifier.java
@@ -80,12 +80,14 @@ public class ResilienceReifier extends
ProcessorReifier<CircuitBreakerDefinition
if (b != null) {
throwExceptionWhenHalfOpenOrOpenState = b;
}
+ // a referenced CircuitBreakerConfig can have its own record and
ignore exceptions
+ boolean baseConfig = config.getConfig() != null;
Predicate<Throwable> recordPredicate = null;
- if (!config.getRecordExceptions().isEmpty()) {
+ if (baseConfig || !config.getRecordExceptions().isEmpty()) {
recordPredicate = cbConfig.getRecordExceptionPredicate();
}
Predicate<Throwable> ignorePredicate = null;
- if (!config.getIgnoreExceptions().isEmpty()) {
+ if (baseConfig || !config.getIgnoreExceptions().isEmpty()) {
ignorePredicate = cbConfig.getIgnoreExceptionPredicate();
}
@@ -135,7 +137,14 @@ public class ResilienceReifier extends
ProcessorReifier<CircuitBreakerDefinition
}
private CircuitBreakerConfig
configureCircuitBreaker(Resilience4jConfigurationCommon config) throws
ClassNotFoundException {
- CircuitBreakerConfig.Builder builder = CircuitBreakerConfig.custom();
+ CircuitBreakerConfig.Builder builder;
+ if (config.getConfig() != null) {
+ // use the referenced config as the base, and apply the other
options on top
+ CircuitBreakerConfig base =
mandatoryLookup(parseString(config.getConfig()), CircuitBreakerConfig.class);
+ builder = CircuitBreakerConfig.from(base);
+ } else {
+ builder = CircuitBreakerConfig.custom();
+ }
if (config.getAutomaticTransitionFromOpenToHalfOpenEnabled() != null) {
builder.automaticTransitionFromOpenToHalfOpenEnabled(
parseBoolean(config.getAutomaticTransitionFromOpenToHalfOpenEnabled()));
@@ -182,7 +191,27 @@ public class ResilienceReifier extends
ProcessorReifier<CircuitBreakerDefinition
if (!config.getIgnoreExceptions().isEmpty()) {
builder.ignoreException(createExceptionPredicate(createIgnoreExceptionClasses()));
}
- return builder.build();
+ CircuitBreakerConfig answer = builder.build();
+ if (config.getConfig() != null) {
+ // the exception lists of the base config only test the top-level
exception, but Camel wraps a checked
+ // exception in a RuntimeCamelException, so also test the
exceptions in the cause chain
+ answer = CircuitBreakerConfig.from(answer)
+
.recordException(testCauseChain(answer.getRecordExceptionPredicate()))
+
.ignoreException(testCauseChain(answer.getIgnoreExceptionPredicate()))
+ .build();
+ }
+ return answer;
+ }
+
+ private static Predicate<Throwable> testCauseChain(Predicate<Throwable>
predicate) {
+ return t -> {
+ for (Throwable te : ObjectHelper.createExceptionIterable(t)) {
+ if (predicate.test(te)) {
+ return true;
+ }
+ }
+ return false;
+ };
}
private BulkheadConfig configureBulkHead(Resilience4jConfigurationCommon
config) {
diff --git
a/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceCircuitBreakerConfigTest.java
b/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceCircuitBreakerConfigTest.java
new file mode 100644
index 000000000000..be3f2fcb7246
--- /dev/null
+++
b/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceCircuitBreakerConfigTest.java
@@ -0,0 +1,199 @@
+/*
+ * 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.resilience4j;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.concurrent.TimeoutException;
+
+import io.github.resilience4j.circuitbreaker.CircuitBreakerConfig;
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.NoSuchBeanException;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spi.CircuitBreakerConstants;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+/**
+ * The config option refers to a CircuitBreakerConfig that is used as the
base, and the other options configured on the
+ * EIP are applied on top of it (CAMEL-27989).
+ */
+public class ResilienceCircuitBreakerConfigTest extends CamelTestSupport {
+
+ @BindToRegistry
+ public CircuitBreakerConfig myConfig() {
+ // values that differ from the resilience4j defaults (50, 100, no
ignored exceptions)
+ return CircuitBreakerConfig.custom()
+ .failureRateThreshold(30)
+ .slidingWindowSize(7)
+ .ignoreExceptions(IllegalStateException.class)
+ .build();
+ }
+
+ @BindToRegistry
+ public CircuitBreakerConfig checkedIgnoreConfig() {
+ return
CircuitBreakerConfig.custom().ignoreExceptions(IOException.class).build();
+ }
+
+ @BindToRegistry
+ public CircuitBreakerConfig checkedRecordConfig() {
+ return
CircuitBreakerConfig.custom().recordExceptions(IOException.class).build();
+ }
+
+ @Test
+ public void testConfigIsUsed() {
+ ResilienceProcessor rp = context.getProcessor("base",
ResilienceProcessor.class);
+ assertNotNull(rp);
+ assertEquals(30f, rp.getCircuitBreakerFailureRateThreshold());
+ assertEquals(7, rp.getCircuitBreakerSlidingWindowSize());
+ }
+
+ @Test
+ public void testOptionsOverrideConfig() {
+ ResilienceProcessor rp = context.getProcessor("override",
ResilienceProcessor.class);
+ assertNotNull(rp);
+ // set on the EIP, so it wins over the referenced config
+ assertEquals(80f, rp.getCircuitBreakerFailureRateThreshold());
+ // not set on the EIP, so it comes from the referenced config
+ assertEquals(7, rp.getCircuitBreakerSlidingWindowSize());
+ }
+
+ @Test
+ public void testIgnoredExceptionOfConfigSkipsFallback() throws Exception {
+ // the referenced config ignores IllegalStateException, so Camel must
not run the fallback for it
+ getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION,
false);
+
getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK,
false);
+
getMockEndpoint("mock:result").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_IGNORED,
true);
+
+ template.sendBody("direct:base", "Hello World");
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Test
+ public void testIgnoredCheckedExceptionOfConfigSkipsFallback() throws
Exception {
+ // a checked exception reaches resilience4j wrapped in a
RuntimeCamelException, it must still be ignored
+ getMockEndpoint("mock:result").expectedMessageCount(0);
+
getMockEndpoint("mock:checkedIgnoreResult").expectedBodiesReceived("Hello
World");
+
getMockEndpoint("mock:checkedIgnoreResult").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_IGNORED,
true);
+
getMockEndpoint("mock:checkedIgnoreResult").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK,
+ false);
+
+ template.sendBody("direct:checkedIgnore", "Hello World");
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Test
+ public void testRecordedCheckedExceptionOfConfigRunsFallback() throws
Exception {
+ // a checked exception in the record list of the base config is a
failure, so the fallback must run
+
getMockEndpoint("mock:checkedRecordResult").expectedBodiesReceived("Fallback
message");
+ getMockEndpoint("mock:checkedRecordResult").expectedPropertyReceived(
+ CircuitBreakerConstants.RESPONSE_SUCCESSFUL_EXECUTION, false);
+
getMockEndpoint("mock:checkedRecordResult").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK,
+ true);
+
+ template.sendBody("direct:checkedRecord", "Hello World");
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Test
+ public void testUnrecordedExceptionOfConfigIsNotAFailure() throws
Exception {
+ // only IOException is recorded by the base config, so another checked
exception is not a failure
+ getMockEndpoint("mock:checkedRecordResult").expectedMessageCount(0);
+ getMockEndpoint("mock:unrecordedResult").expectedBodiesReceived("Hello
World");
+
getMockEndpoint("mock:unrecordedResult").expectedPropertyReceived(CircuitBreakerConstants.RESPONSE_FROM_FALLBACK,
+ false);
+
+ template.sendBody("direct:unrecorded", "Hello World");
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Test
+ public void testUnknownConfigFails() {
+ // like the circuitBreaker option, a reference that is not in the
registry fails the route instead of
+ // silently using the defaults
+ Exception e = assertThrows(Exception.class, () ->
context.addRoutes(new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:unknown")
+
.circuitBreaker().resilience4jConfiguration().config("myUnknownConfig").end()
+ .to("mock:unknown")
+ .end();
+ }
+ }));
+ NoSuchBeanException cause =
ObjectHelper.getException(NoSuchBeanException.class, e);
+ assertNotNull(cause, "Expected NoSuchBeanException in the cause chain
of " + e);
+ assertEquals("myUnknownConfig", cause.getName());
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:base")
+
.circuitBreaker().id("base").resilience4jConfiguration().config("myConfig").end()
+ .throwException(new IllegalStateException("Forced"))
+ .onFallback()
+ .transform().constant("Fallback message")
+ .end()
+ .to("mock:result");
+
+ from("direct:checkedIgnore")
+
.circuitBreaker().resilience4jConfiguration().config("checkedIgnoreConfig").end()
+ .throwException(new IOException("Forced"))
+ .onFallback()
+ .transform().constant("Fallback message")
+ .end()
+ .to("mock:checkedIgnoreResult");
+
+ from("direct:checkedRecord")
+
.circuitBreaker().resilience4jConfiguration().config("checkedRecordConfig").end()
+ .throwException(new FileNotFoundException("Forced"))
+ .onFallback()
+ .transform().constant("Fallback message")
+ .end()
+ .to("mock:checkedRecordResult");
+
+ from("direct:unrecorded")
+
.circuitBreaker().resilience4jConfiguration().config("checkedRecordConfig").end()
+ .throwException(new TimeoutException("Forced"))
+ .onFallback()
+ .transform().constant("Fallback message")
+ .end()
+ .to("mock:unrecordedResult");
+
+ from("direct:override")
+
.circuitBreaker().id("override").resilience4jConfiguration().config("myConfig")
+ .failureRateThreshold(80).end()
+ .to("mock:override")
+ .end();
+ }
+ };
+ }
+
+}
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resilience4jConfiguration.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resilience4jConfiguration.json
index 0ac5b7b290fc..6ee64cd40d9b 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resilience4jConfiguration.json
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resilience4jConfiguration.json
@@ -14,7 +14,7 @@
"properties": {
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
"circuitBreaker": { "index": 1, "kind": "attribute", "displayName":
"Circuit Breaker", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use." },
- "config": { "index": 2, "kind": "attribute", "displayName": "Config",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry." },
+ "config": { "index": 2, "kind": "attribute", "displayName": "Config",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applie [...]
"failureRateThreshold": { "index": 3, "kind": "attribute", "displayName":
"Failure Rate Threshold", "group": "common", "required": false, "type":
"number", "javaType": "java.lang.Float", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "50", "description": "Configures the
failure rate threshold in percentage. If the failure rate is equal or greater
than the threshold the CircuitBreaker transitions to open and starts
short-circuiting calls." },
"permittedNumberOfCallsInHalfOpenState": { "index": 4, "kind":
"attribute", "displayName": "Permitted Number Of Calls In Half Open State",
"group": "advanced", "label": "advanced", "required": false, "type": "integer",
"javaType": "java.lang.Integer", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 10, "description": "Configures the number of
permitted calls when the CircuitBreaker is half open." },
"throwExceptionWhenHalfOpenOrOpenState": { "index": 5, "kind":
"attribute", "displayName": "Throw Exception When Half Open Or Open State",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether to throw
io.github.resilience4j.circuitbreaker.CallNotPermittedException when the call
is rejected because the circuit breaker is half open or open." },
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java
index 4692976749e6..e0edc4be8015 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java
@@ -36,7 +36,10 @@ public class Resilience4jConfigurationCommon extends
IdentifiedType {
private String circuitBreaker;
@XmlAttribute
@Metadata(label = "advanced",
- description = "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry.")
+ description = "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry."
+ + " It is used as the base configuration, and the
other circuit breaker options that are configured are applied on top of it."
+ + " When recordExceptions or ignoreExceptions are
also set, they replace a custom record or ignore exception predicate of the
referenced config instead of combining with it, while its exception classes are
kept."
+ + " When the circuitBreaker option is also set,
that circuit breaker keeps its own configuration, and only the record and
ignore exceptions of this config decide whether the fallback runs.")
private String config;
@XmlAttribute
@Metadata(defaultValue = "50", javaType = "java.lang.Float",
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationDefinition.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationDefinition.java
index d0941bf1e52d..4309baca388b 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationDefinition.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationDefinition.java
@@ -69,7 +69,11 @@ public class Resilience4jConfigurationDefinition extends
Resilience4jConfigurati
/**
* Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from
- * the registry.
+ * the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are
+ * applied on top of it. When recordExceptions or ignoreExceptions are
also set, they replace a custom record or
+ * ignore exception predicate of the referenced config instead of
combining with it, while its exception classes are
+ * kept. When the circuitBreaker option is also set, that circuit breaker
keeps its own configuration, and only the
+ * record and ignore exceptions of this config decide whether the fallback
runs.
*/
public Resilience4jConfigurationDefinition config(String ref) {
setConfig(ref);
diff --git
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 5fe541dee5c3..0db9a6f15fd5 100644
---
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -379,7 +379,7 @@
{ "name": "camel.resilience4j.bulkheadMaxConcurrentCalls", "required":
false, "description": "The maximum number of concurrent calls that the bulkhead
lets through, when bulkheadEnabled is true. When not set, Resilience4j uses
25.", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer",
"javaType": "java.lang.Integer", "secret": false },
{ "name": "camel.resilience4j.bulkheadMaxWaitDuration", "required": false,
"description": "Configures a maximum amount of time which the calling thread
will wait to enter the bulkhead. Accepts Camel duration expressions (e.g.
500ms, 1s) or millisecond values. Default is 0 (no waiting).", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "string",
"javaType": "java.lang.String", "secret": false },
{ "name": "camel.resilience4j.circuitBreaker", "required": false,
"description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use.", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "string",
"javaType": "java.lang.String", "secret": false },
- { "name": "camel.resilience4j.config", "required": false, "description":
"Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance in the
registry. Not used at present: camel-resilience4j builds the configuration from
the other options.", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "string",
"javaType": "java.lang.String", "secret": false },
+ { "name": "camel.resilience4j.config", "required": false, "description":
"Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applied on top of it. When
recordExceptions or ignoreExceptions are also set, they replace a custom record
or ignore exception predicate of the referenced config instead of combining
with [...]
{ "name": "camel.resilience4j.failureRateThreshold", "required": false,
"description": "Configures the failure rate threshold in percentage. If the
failure rate is equal or greater than the threshold the CircuitBreaker
transitions to open and starts short-circuiting calls. The threshold must be
greater than 0 and not greater than 100. Default value is 50 percentage.",
"sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties",
"type": "number", "javaType": "java.lang.F [...]
{ "name": "camel.resilience4j.maxWaitDurationInHalfOpenState", "required":
false, "description": "Configures the maximum wait duration which controls how
long the CircuitBreaker should stay in Half Open state, before it switches to
open. Value 0 means circuit breaker will wait in half open state until all
permitted calls have been completed. Accepts Camel duration expressions (e.g.
10s, 1m) or millisecond values.", "sourceType":
"org.apache.camel.main.Resilience4jConfigurationPropert [...]
{ "name": "camel.resilience4j.micrometerEnabled", "required": false,
"description": "Whether to enable collecting statistics using Micrometer. This
requires adding camel-resilience4j-micrometer JAR to the classpath.",
"sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties",
"type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": false,
"secret": false },
diff --git a/core/camel-main/src/main/docs/main.adoc
b/core/camel-main/src/main/docs/main.adoc
index 08ace29d5bcd..a9fe8bf2357b 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -757,7 +757,7 @@ The camel.resilience4j supports 25 options, which are
listed below.
| `camel.resilience4j.bulkheadMaxConcurrentCalls` | The maximum number of
concurrent calls that the bulkhead lets through, when bulkheadEnabled is true.
When not set, Resilience4j uses 25. | | Integer
| `camel.resilience4j.bulkheadMaxWaitDuration` | Configures a maximum amount
of time which the calling thread will wait to enter the bulkhead. Accepts Camel
duration expressions (e.g. 500ms, 1s) or millisecond values. Default is 0 (no
waiting). | | String
| `camel.resilience4j.circuitBreaker` | Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use. | | String
-| `camel.resilience4j.config` | Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance in the
registry. Not used at present: camel-resilience4j builds the configuration from
the other options. | | String
+| `camel.resilience4j.config` | Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applied on top of it. When
recordExceptions or ignoreExceptions are also set, they replace a custom record
or ignore exception predicate of the referenced config instead of combining
with it, while its exception classes are kept. Whe [...]
| `camel.resilience4j.failureRateThreshold` | Configures the failure rate
threshold in percentage. If the failure rate is equal or greater than the
threshold the CircuitBreaker transitions to open and starts short-circuiting
calls. The threshold must be greater than 0 and not greater than 100. Default
value is 50 percentage. | 50 | Float
| `camel.resilience4j.maxWaitDurationInHalfOpenState` | Configures the maximum
wait duration which controls how long the CircuitBreaker should stay in Half
Open state, before it switches to open. Value 0 means circuit breaker will wait
in half open state until all permitted calls have been completed. Accepts Camel
duration expressions (e.g. 10s, 1m) or millisecond values. | 0 | String
| `camel.resilience4j.micrometerEnabled` | Whether to enable collecting
statistics using Micrometer. This requires adding camel-resilience4j-micrometer
JAR to the classpath. | false | Boolean
diff --git
a/core/camel-main/src/main/java/org/apache/camel/main/Resilience4jConfigurationProperties.java
b/core/camel-main/src/main/java/org/apache/camel/main/Resilience4jConfigurationProperties.java
index 8d514a30a04e..eb04edc8c2b2 100644
---
a/core/camel-main/src/main/java/org/apache/camel/main/Resilience4jConfigurationProperties.java
+++
b/core/camel-main/src/main/java/org/apache/camel/main/Resilience4jConfigurationProperties.java
@@ -107,8 +107,12 @@ public class Resilience4jConfigurationProperties
implements BootstrapCloseable {
}
/**
- * Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance in the
registry. Not
- * used at present: camel-resilience4j builds the configuration from the
other options.
+ * Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from
+ * the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are
+ * applied on top of it. When recordExceptions or ignoreExceptions are
also set, they replace a custom record or
+ * ignore exception predicate of the referenced config instead of
combining with it, while its exception classes are
+ * kept. When the circuitBreaker option is also set, that circuit breaker
keeps its own configuration, and only the
+ * record and ignore exceptions of this config decide whether the fallback
runs.
*/
public void setConfig(String config) {
this.config = config;
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_25.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_25.adoc
index b009ce68df04..403decfa0163 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_25.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_25.adoc
@@ -393,3 +393,25 @@ a later row had was dropped silently, and a later element
that was not a `Map` f
every element must be a `Map`, and a row whose keys differ from the keys of
the first row fails with a
`DuckDbException` that names the row. A route that inserts rows with different
keys must give every row the same keys
(with `null` for a missing value).
+
+
+=== camel-resilience4j - the config option is used
+
+The `config` option of the Resilience4j EIP configuration (and
`camel.resilience4j.config`) refers to a
+`io.github.resilience4j.circuitbreaker.CircuitBreakerConfig` in the registry,
but it was never read, so the circuit
+breaker used the resilience4j defaults instead. The referenced config is now
used as the base configuration, and the
+other circuit breaker options that are set on the EIP are applied on top of
it. This includes the record and ignore
+exceptions of the referenced config, which now also decide whether the
fallback runs.
+
+When `recordExceptions` or `ignoreExceptions` are also set on the EIP, they
replace a custom record or ignore exception
+predicate (`recordException(Predicate)` or `ignoreException(Predicate)`) of
the referenced config instead of combining
+with it. The exception classes of the referenced config
(`recordExceptions(...)` and `ignoreExceptions(...)`) are kept.
+
+The exceptions are also matched against the causes of the exception that the
route threw, so a checked exception such as
+an `IOException` in the record or ignore list of the referenced config
matches, as it does for the `recordExceptions`
+and `ignoreExceptions` options of the EIP.
+
+When the `circuitBreaker` option is also set, that circuit breaker keeps its
own configuration, and only the record and
+ignore exceptions of the `config` option decide whether the fallback runs.
+
+A reference that is not in the registry now fails the route at startup, as the
`circuitBreaker` option does.
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 9f6063ca362f..b1f1fe7047cb 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
@@ -14256,7 +14256,7 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
@YamlProperty(name = "bulkheadMaxConcurrentCalls", type =
"number", defaultValue = "25", description = "Configures the max amount of
concurrent calls the bulkhead will support.", displayName = "Bulkhead Max
Concurrent Calls"),
@YamlProperty(name = "bulkheadMaxWaitDuration", type =
"string", defaultValue = "0", description = "Configures a maximum amount of
time which the calling thread will wait to enter the bulkhead. The default is 0
(no waiting).", displayName = "Bulkhead Max Wait Duration"),
@YamlProperty(name = "circuitBreaker", type = "string",
description = "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use.", displayName = "Circuit Breaker"),
- @YamlProperty(name = "config", type = "string",
description = "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry.", displayName = "Config"),
+ @YamlProperty(name = "config", type = "string",
description = "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applied on top of it. When
recordExceptions or ignoreExceptions are also set, they replace a custom record
or ignore exception predicate of the referenced config instead of combining
[...]
@YamlProperty(name = "failureRateThreshold", type =
"number", defaultValue = "50", description = "Configures the failure rate
threshold in percentage. If the failure rate is equal or greater than the
threshold the CircuitBreaker transitions to open and starts short-circuiting
calls.", displayName = "Failure Rate Threshold"),
@YamlProperty(name = "id", type = "string", description =
"The id of this node", displayName = "Id"),
@YamlProperty(name = "ignoreException", type =
"array:string", description = "Configure a list of exceptions that are ignored
and neither count as a failure nor success. Any exception matching or
inheriting from one of the list will not count as a failure nor success, even
if the exception is part of recordExceptions.", displayName = "Ignore
Exception"),
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json
index 83f3fa43c2d1..5e368532c81f 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json
@@ -3714,7 +3714,7 @@
"config" : {
"type" : "string",
"title" : "Config",
- "description" : "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry."
+ "description" : "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applied on top of it. When
recordExceptions or ignoreExceptions are also set, they replace a custom record
or ignore exception predicate of the referenced config instead of combining
with it, while its exception classes are kept. When t [...]
},
"failureRateThreshold" : {
"type" : "number",
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json
index 9c703d567124..8717740cae4f 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json
@@ -6278,7 +6278,7 @@
}, {
"name" : "config",
"type" : "string",
- "description" : "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry.",
+ "description" : "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applied on top of it. When
recordExceptions or ignoreExceptions are also set, they replace a custom record
or ignore exception predicate of the referenced config instead of combining
with it, while its exception classes are kept. When the c [...]
"title" : "Config",
"displayName" : "Config",
"kind" : "attribute",
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index 44545ab78493..f336aec7f27b 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -4937,7 +4937,7 @@
"config" : {
"type" : "string",
"title" : "Config",
- "description" : "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry."
+ "description" : "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry. It is used as the base configuration, and the other
circuit breaker options that are configured are applied on top of it. When
recordExceptions or ignoreExceptions are also set, they replace a custom record
or ignore exception predicate of the referenced config instead of combining
with it, while its exception classes are kept. When t [...]
},
"failureRateThreshold" : {
"type" : "number",