2 Replies Latest reply on Jun 10, 2013 9:24 AM by srikanth josyula

    Number of Consumers on HornetQ Clustered Node is 0

    srikanth josyula Newbie

      I have HornetQ cluster with 2 nodes. Please look at attached flow.jpg for mule flow.

      Mule Flow1:

      I have Mule ESB using JMS component to Insert into clustured Queue.

      Mule Flow2:

      Read from HornetQ cluster and invoke a Mule Callback listener which will read the messages.

      Two nodes are getting messages in round robin fashion because forward-when-no-consumers is set to true. If i set it to false then its going to one node only. which is correct.

      Which is well and good but when i monitor the queues using JConsole it clearly says consumer count on node1 is 6 and node2 is 0.

      So when the message goes to second node then it just not doing anying because there is no consumer to consume the message. For node 1 it shows 6 because in Mule ESB i specified number of consumers to 6.

      <jms:connector name="hornetq-connector" username="guest"

              maxRedelivery="5" password="guest" specification="1.1"

              connectionFactory-ref="connectionFactory" doc:name="JMS"   numberOfConsumers="6" >

              <spring:property name="retryPolicyTemplate" ref="ThreadingPolicyTemplate"  />

      </jms:connector>

      config.zip:-Please find attached hornetq configuration files.

       

      My question: Is there any way i can increase the number of consumers or distribute the consumers across multiple nodes.

       

      Thanks,