title: Is it possible to define when camel JMS Component must connect to brokerURL or just log something
body: <p>The problem is that I need to have the possibility to control through property value when the Camel must connect to Artemis URL and when just Log a message that this connection is disabled.
  I know this easily could be done in route configuration, but I'm curious is it possible to do it in the Camel JMS component or its configuration process?</p>
  <p>Property values:</p>
  <pre><code>activemq:
    url: tcp://localhost:61616
    password: admin
    user: admin
    connect: true
  </code></pre>
  <p>My Configuration:</p>
  <pre><code>    @Bean(&quot;amqConnFact&quot;)
      public ActiveMQConnectionFactory getAmqCF(@Value(&quot;${activemq.url}&quot;) String url,
                                                @Value(&quot;${activemq.user}&quot;) String user,
                                                @Value(&quot;${activemq.password}&quot;) String password) {
          ActiveMQConnectionFactory amqCF = new ActiveMQConnectionFactory();
          amqCF.setBrokerURL(url);
          amqCF.setUserName(user);
          amqCF.setPassword(password);
          return amqCF ;
      }
  
      @Bean(&quot;cachingConnFact&quot;)
      public CachingConnectionFactory getCachingConnectionFactory(@Qualifier(&quot;amqConnFact&quot;) ActiveMQConnectionFactory amqCF) {
          CachingConnectionFactory cachingCF = new CachingConnectionFactory();
          cachingCF.setTargetConnectionFactory(amqCF);
          return cachingCF;
      }
  </code></pre>
  <p>I'd like to have something like this:</p>
  <pre><code>    @Bean(&quot;mycomp&quot;)
      public JmsComponent activeMqComponent(@Qualifier(&quot;cachingConnFact&quot;, @Value(&quot;${activemq.connect}&quot;) boolean connect) CachingConnectionFactory cachingCF) {
          if(connect){
              return JmsComponent.setConnectionFactory(cachingCF);
          }else{
              -- LOG &quot;This connection is disabled in properties&quot;--
          }
      }
  </code></pre>
  <p>And in route it could look just like this:</p>
  <pre><code>...
  .to(&quot;mycomp:topic:WOW.IT.WORKS&quot;);
  </code></pre>