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

Change Camel Context Name on Camel Spring Boot

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.15.0
    • 2.15.0
    • None
    • None
    • camel-spring-boot

    • Unknown

    Description

      Cant change the Camel Context Name fully, if the RouteBuilder ran already.

      This Code is not working for the JMX MBeans

      MyAppConfig.java
      @Configuration
      public class MyAppConfig {
       
        ...
       
        @Bean
        CamelContextConfiguration contextConfiguration() {
          return new CamelContextConfiguration() {
            @Override
            public void beforeApplicationStart(CamelContext context) {
              ((SpringCamelContext)context).setName("foo");
            }
          };
        }
      }
      

      The JMX MBeans are not updated after the RouteBuilde ran:
      The Context Name Changed, but the JMX Object Name not.
      "foo" != "camel-1"

      Attachments

        1. context_name.png
          45 kB
          Edgar Wentzlaff

        Activity

          People

            njiang Willem Jiang
            eddi888 Edgar Wentzlaff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: