4 Replies Latest reply on Aug 4, 2011 11:00 AM by Andy Taylor

    HornetQ 2.2.5.Final - MDB not consuming messages properly from queues in a 3-node JMS standalone-server cluster

    Mayukh Ray Newbie

      I have a 3-node cluster of standalone hornetq messaging servers (V 2.2.5.Final) on one of my machine and a queue with the same jndi name "queue/jmsLoggerQueue" on each of the 3 servers.


      I connect to one of the queues through JNDI and pass 5 messages which gets distributed in round-robin fasion among the queues.

      I have verified this using jconsole and also Hermes JMS queue browser.


      Please note that none of the queues have any consumers associated with them yet


      Next I start my JBoss server (6.0.0.Final version) on another machine (please note that I upgraded the hornetq version in JBoss 6 from 2.1.2 to 2.2.5 before firing up the server). I already have a message-driven bean defined and deployed , which is supposed to consume messages from "queue/jmsLoggerQueue" from all the 3 hornetq servers (running on the first machine)


      But after the server fires up and the MDB is deployed, it ends up consuming message only from one queue, which is on server with a JNDI jnp port of 1099 (FYI - the jnp ports for the other 2 hornetq servers in the cluster are 2099 and 3099)


      It does not consume any message from the other 2 queues on the remaining 2 servers in the cluster.


      This does not happen if I fire up my JBoss server first and send message to the queues, only after the JBoss server has started up and the MDB properly deployed!!!!!!!!!!!!!


      My ra.xml file on JBoss FYI (only the portion I have changed from the default)





                  The transport type. Multiple connectors can be configured by using a comma separated list,

                  i.e. org.hornetq.core.remoting.impl.invm.InVMConnectorFactory,org.hornetq.core.remoting.impl.invm.InVMConnectorFactory.







               <description>The transport configuration. These values must be in the form of key=val;key=val;,

                  if multiple connectors are used then each set must be separated by a comma i.e. host=host1;port=5445,host=host2;port=5446.

                  Each set of params maps to the connector classname specified.








      Any idea as to why this is happening?