Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
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:
// 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
Then the configrations can be referenced in camel routes:
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"); } }; } }
This would also have to create additional "templates" one can inherit and further customize in routes.