Luca Burgazzoli created CAMEL-11023:
---------------------------------------
Summary: Hystrix Starter : add an option to configure additional
configuration via spring-boot properties
Key: CAMEL-11023
URL: https://issues.apache.org/jira/browse/CAMEL-11023
Project: Camel
Issue Type: Improvement
Components: camel-hystrix, camel-spring-boot-starters
Reporter: Luca Burgazzoli
Assignee: Luca Burgazzoli
Priority: Minor
Fix For: 2.19.0
In addition to configre the default hystrix configuration it would be nice to
have a way to configre additional configurations in spring-boot
appliction.properties, like:
{code}
// default
camel.hystrix.group-key=global-group
// named conf conf-1
camel.hystrix.configurations.conf-1.group-key=conf-1-group
// named conf conf-1
camel.hystrix.configurations.conf-2.group-key=conf-2-group
{code}
Then the configrations can be referenced in camel routes:
{code:java}
public class HystrixMultiConfiguration {
@Bean
public RouteBuilder routeBuilder() {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start-1")
.routeId("hystrix-route-1")
.hystrix()
.hystrixConfiguration("conf-1")
.to("direct:foo")
.onFallback()
.transform().constant("Fallback message")
.end();
from("direct:start-2")
.routeId("hystrix-route-2")
.hystrix()
.hystrixConfiguration("conf-2")
.to("direct:foo")
.onFallback()
.transform().constant("Fallback message")
.end();
from("direct:foo")
.transform().body(b -> "Bye World");
}
};
}
}
{code}
This would also have to create additional "templates" one can inherit and
further customize in routes.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)