4 Replies Latest reply on Oct 20, 2014 11:19 AM by virchete

    Fuse Fabric + Active MQ

    virchete

      HI,

       

      I use the Active MQ module that is integrated in Fuse 6.1.

       

      Now I would like to do the same using Fabric, the version that is included in the Fuse 6.1 distribution.

       

      For creating the Connection I am using:

       

      ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(username, password, URL);

       

      In case of Fuse the URL is: tcp://localhost:61616

      For fuse fabric I am using the URL suggested by one member of your team: fabric://default

       

      But when this URL is getting used then the server returns the following exception:

       

      https://gist.github.com/dvirgiln/1705279decc9bea80e17

       

      Additionally I want to remark that for avoiding one ClassNotFoundException related one ActiveMQ Class I added this profile:

      mq-client

        • 1. Re: Fuse Fabric + Active MQ
          yngve2

          The correct URL is:

           

          discovery:(fabric:default)

          • 2. Re: Fuse Fabric + Active MQ
            virchete

            Hi,

             

            I have tried the url you suggested me:

             

                            ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(username, password, "discovery:(fabric://default)");

             

            When this line is executed then I receive an exception:

             

            https://gist.github.com/dvirgiln/179c5adeaa1b6972411c

             

            This class belongs to the activemq client jar. And the mq-client profile has been added.

             

            Additionaly I have another question. It is required for creating the ActiveMQConnectionFactory the credentials username/password. Could it be deactivated? I say this because right now the username/password is stored into a properties file, but as the profiles are common for different container instances it has no sense to maintain a common username/password.

            • 3. Re: Fuse Fabric + Active MQ
              davsclaus

              Can you tell more about what you have otherwise customized as there is some overlord in the stacktrace. And it may be that overlord is not OSGi friendly causing that problem.

               

              java.lang.NoClassDefFoundError: org/apache/activemq/broker/region/policy/RedeliveryPolicyMap

              at org.apache.activemq.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:85)

              at org.overlord.sramp.events.jms.JMSEventProducer.startup(JMSEventProducer.java:141)

              at org.overlord.sramp.server.SrampLifeCycle.contextInitialized(SrampLifeCycle.java:24)

              • 4. Re: Fuse Fabric + Active MQ
                virchete

                Hi Claus,

                 

                This error dissapeared. No worries about this.