[camel] branch master updated: CAMEL-14548: resilience4j doesn't catch configuration from spring boot

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated: CAMEL-14548: resilience4j doesn't catch configuration from spring boot

davsclaus-2
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 60a8dc9  CAMEL-14548: resilience4j doesn't catch configuration from spring boot
60a8dc9 is described below

commit 60a8dc94c7b608172e30e4d0d6176637cf0b3cdc
Author: Claus Ibsen <[hidden email]>
AuthorDate: Thu Feb 13 18:37:46 2020 +0100

    CAMEL-14548: resilience4j doesn't catch configuration from spring boot
---
 .../apache/camel/component/resilience4j/ResilienceReifier.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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 b0bf8b6..bb7e2b1 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
@@ -168,16 +168,18 @@ public class ResilienceReifier extends ProcessorReifier<CircuitBreakerDefinition
 
         // Extract properties from default configuration, the one configured on
         // camel context takes the precedence over those in the registry
-        loadProperties(camelContext, properties, Suppliers.firstNotNull(() -> camelContext.getExtension(Model.class).getResilience4jConfiguration(null),
-        () -> lookup(camelContext, "Camel", Resilience4jConfigurationDefinition.class)));
+        loadProperties(camelContext, properties, Suppliers.firstNotNull(
+            () -> camelContext.getExtension(Model.class).getResilience4jConfiguration(null),
+            () -> lookup(camelContext, ResilienceConstants.DEFAULT_RESILIENCE_CONFIGURATION_ID, Resilience4jConfigurationDefinition.class)));
 
         // Extract properties from referenced configuration, the one configured
         // on camel context takes the precedence over those in the registry
         if (definition.getConfigurationRef() != null) {
             final String ref = definition.getConfigurationRef();
 
-            loadProperties(camelContext, properties, Suppliers.firstNotNull(() -> camelContext.getExtension(Model.class).getResilience4jConfiguration(ref),
-            () -> mandatoryLookup(camelContext, ref, Resilience4jConfigurationDefinition.class)));
+            loadProperties(camelContext, properties, Suppliers.firstNotNull(
+                () -> camelContext.getExtension(Model.class).getResilience4jConfiguration(ref),
+                () -> mandatoryLookup(camelContext, ref, Resilience4jConfigurationDefinition.class)));
         }
 
         // Extract properties from local configuration