1 Reply Latest reply on Jun 8, 2014 9:00 PM by ffang

    Broker definition - activemq.xml - Fuse 6

    happyuser828612

      I am wondering if anyone can help me with this.

       

      1. I am accessing a topic using activemq:topic:TopicName in the blueprint.xml

           Example :

           blueprint.xml:

            <route>

              <from uri="someURI"/>

              <to uri="activemq:topic:TopicName"/>

            </route>

      2. I have defined the broker for activemq(bean) in activemq.xml in FUSE 6[which was automatically available in activemq-broker.xml in the previous versions].    

           Example :

           activemq.xml:

          

           <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >

              <property name="connectionFactory">

                <bean class="org.apache.activemq.ActiveMQConnectionFactory">

                  <property name="brokerURL" value="vm://localhost?create=false" />

                  <property name="userName" value="admin"/>

                  <property name="password" value="admin"/>

                </bean>

              </property>

          </bean>


      But I am getting exception as username null or password is invalid.

       

      So, I defined the activemq bean in my blueprint itself, everything worked fine. Since I have around 40 blueprints in my projects which access the same broker, it doesnt sound good to repeat the activemq bean definition in all the bluprints. It would be ideal to define broker bean in activemq.xml for once and just access the topic in all the blueprints I need.

       

      So what am I missing here? Should we create exact replica of activemq-broker.xml as some OSGI service and refer in all the 40 blueprints??


      -Thanks