Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11023

Hystrix Starter : add an option to configure additional configuration via spring-boot properties

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      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.

        Attachments

          Activity

            People

            • Assignee:
              lb Luca Burgazzoli
              Reporter:
              lb Luca Burgazzoli

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment