3 Replies Latest reply on Jan 14, 2010 8:36 AM by timfox

    Migrating JBossMQ queues to HornetQ

    philiplee

      Hi,

       

      (JBossAS 4.2.3GA, HornetQ 2.0.0GA, JRE6)

       

      I've tried to replicate my JBossMQ queue configuration in HornetQ but I get this error during my application startup:

       

      Cannot create a consumer with a null destination
      javax.jms.InvalidDestinationException: Cannot create a consumer with a null destination
              at org.hornetq.jms.client.HornetQSession.createConsumer(HornetQSession.java:373)
              at org.hornetq.jms.client.HornetQSession.createConsumer(HornetQSession.java:359)
              at org.hornetq.jms.client.HornetQSession.createReceiver(HornetQSession.java:817)
              at org.hornetq.ra.HornetQRASession.createReceiver(HornetQRASession.java:890)

              ...

       

       

      The JBossMQ entries are like this:

       

      <mbean code="org.jboss.mq.server.jmx.Queue"
            name="jboss.mq.destination:service=Queue,name=QUEUE1">
           <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               <attribute name="JNDIName">jms/QUEUE1</attribute>
        </mbean>

       

      and the new entries in hornetq-jms.xml have the form:

       

          <queue name="QUEUE1">
              <entry name="jms/QUEUE1"/>
          </queue>

       

      Any ideas as to what is going wrong? Do I need some extra config?

       

      Also, deploy/conf/standardjboss.xml has this element <CreateJBossMQDestination>true</CreateJBossMQDestination> :

       

          <invoker-proxy-binding>
            <name>message-driven-bean</name>
            <invoker-mbean>default</invoker-mbean>
            <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
            <proxy-factory-config>
              <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
              <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
              <CreateJBossMQDestination>true</CreateJBossMQDestination>

              ...

       

      Does this need changing (as it does if replacing JBossMQ with JBM 1.4.5) ?

       

      Thanks,

       

          Phil.

        • 1. Re: Migrating JBossMQ queues to HornetQ
          timfox

          JBoss MQ and HornetQ are completely different messaging systems and are configured quite differently. You can't use JBoss MQ config with HornetQ.

           

          Take a look at the user manual for an indepth guide for configuring HornetQ.

           

          Also there are plenty of examples in the distro that show how to declare and configure queues.

          • 2. Re: Migrating JBossMQ queues to HornetQ
            philiplee

            Having installed HornetQ (as per quck start quide) on a vanilla JBoss 4.2.3GA there still appear to be remnants of JBossMQ (as per the default-with-hornetq/conf/standardjboss.xml mentioned above).

             

            To rephrase one of my questions, are these JBossMQ remnants safe or do they need removing?

             

            Thanks.

            • 3. Re: Migrating JBossMQ queues to HornetQ
              timfox
              I'm not really an expert on JBoss application server configuration (which is what that is), but I'm pretty sure that is only relevant to JBoss MQ, not to HornetQ.