davsclaus opened a new pull request, #28509:
URL: https://github.com/apache/camel/pull/28509

   With live reloading (`camel run --dev`), a change to application.properties 
applies its `camel.component.*`, `camel.dataformat.*`, `camel.language.*` and 
new `camel.beans.*` keys (CAMEL-25767), but not the defaults of the circuit 
breakers: `camel.resilience4j.*` and `camel.faulttolerance.*` were read only at 
startup. Circuit breaker settings are hard to get right without trying them, 
and a restart for each try slows this down. Jira: 
[CAMEL-26320](https://issues.apache.org/jira/browse/CAMEL-26320)
   
   A properties reload already creates the routes again after it applies the 
configuration, and a circuit breaker reads the defaults when its route is 
created (it also removes its breaker from the registry when it stops). So 
`autoConfigurationFromReloadedProperties` now binds the `camel.resilience4j.*` 
and `camel.faulttolerance.*` keys that are new or changed onto the default 
configurations of the model, with the same code as at startup 
(`MainSupportModelConfigurer`). No restart of the CamelContext is needed.
   
   Tests:
   - `MainPropertiesReloadCircuitBreakerTest`: the changed keys reach the model 
defaults, a key that did not change keeps its value, and a reload without these 
keys leaves the defaults as they are. camel-main passes (310 tests).
   - `camel run --dev` (the launcher built from this branch): a circuit breaker 
that always fails, started with `minimumNumberOfCalls=1000`, logs CLOSED. After 
application.properties is saved with `minimumNumberOfCalls=2`, it logs OPEN 
without a restart. With the camel CLI from main it stays CLOSED.
   
   A key that is removed from the file keeps its value until a restart, as a 
reload passes the keys that are new or changed (noted in the 4.24 upgrade 
guide).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to