Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7216

BlueprintCamelContext can not add an ActiveMQComponent using non-default name in RouteBuilder.configure method

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • jboss-fuse-6.3
    • Camel
    • None
    • Low
    • % %

    Description

      I have a simple Java DSL route that adds an ActiveMQComponent using non-default name (for instance "test-jms" rather than default name "activemq") within RouteBuilder.configure() method. However, it does not work. Instead, it's just stuck on trying to resolve the "test-jms" component forever.

      public class TestRouteBuilder extends RouteBuilder {
          private static final Logger LOG = LoggerFactory.getLogger(TestRouteBuilder.class);
          private CamelContext camelContext;
      
          public void configure() {
              try {
                  camelContext = getContext();
                  ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
                  connectionFactory.setBrokerURL("tcp://localhost:61616");
                  connectionFactory.setUserName("admin");
                  connectionFactory.setPassword("admin");
      
                  PooledConnectionFactory pooledConnectionFactory = new PooledConnectionFactory();
                  pooledConnectionFactory.setConnectionFactory(connectionFactory);
      
                  JmsConfiguration jmsConfiguration = new JmsConfiguration();
                  jmsConfiguration.setConnectionFactory(pooledConnectionFactory);
                  jmsConfiguration.setAcknowledgementModeName("AUTO_ACKNOWLEDGE");
                  JmsComponent jmsComponent = new JmsComponent(jmsConfiguration);
      
                  camelContext.addComponent("test-jms", jmsComponent);
              } catch (Exception e) {
                  LOG.error("caught an exception!");
              }
          }
      }
      

      It is a known issue:
      https://issues.apache.org/jira/browse/CAMEL-10394

      We need to backport the fix to 6.3.

      Attachments

        Issue Links

          Activity

            People

              acosenti Andrea Cosentino
              rhn-support-qluo Joe Luo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: