3 Replies Latest reply on Dec 14, 2010 11:48 AM by jicken

    Problem with message redistribution in cluster

    sv_srinivaas
      Hi I'm not able to run the queue-message-redistribution example that comes with Hornetq. I get the below exception with a failure message but I'm able to run the clustered-queue example successfully. Pls help.

       

      Environment details: Jboss 5.0.0.GA, HornetQ 2.0.0 CR2, Windows Xp (SP2)

       

           [java] INFO: using server0\client-jndi.properties for jndi
           [java] Jan 18, 2010 12:33:11 PM org.hornetq.common.example.HornetQExample getContext
           [java] INFO: using server1\client-jndi.properties for jndi
           [java] Sent message: This is text message 0
           [java] Sent message: This is text message 1
           [java] Sent message: This is text message 2
           [java] Sent message: This is text message 3
           [java] Sent message: This is text message 4
           [java] Sent message: This is text message 5
           [java] Sent message: This is text message 6
           [java] Sent message: This is text message 7
           [java] Sent message: This is text message 8
           [java] Sent message: This is text message 9
           [java] Got message: This is text message 0 from node 0
           [java] java.lang.NullPointerException
           [java]     at org.hornetq.jms.example.QueueMessageRedistributionExample.runExample(QueueMessageRedistributionExample.java:126)
           [java]     at org.hornetq.common.example.HornetQExample.run(HornetQExample.java:73)
           [java]     at org.hornetq.jms.example.QueueMessageRedistributionExample.main(QueueMessageRedistributionExample.java:38)
           [java]
           [java] #####################
           [java] ###    FAILURE!   ###
           [java] #####################
           [java] Java Result: 1

      BUILD FAILED
      C:\hornetq-2.0.0.CR2\examples\jms\queue-message-redistribution\build.xml:23: The  following error occurred while executing this line:
      C:\hornetq-2.0.0.CR2\examples\common\build.xml:154: Example org.hornetq.jms.example.QueueMessageRedistributionExample failed

      Total time: 11 seconds
      Done

       

        • 1. Re: Problem with message redistribution in cluster
          jmesnil
          You are using HornetQ 2.0.0.CR2. Did you try using 2.0.0.GA instead to see if the example works?
          • 2. Re: Problem with message redistribution in cluster
            sv_srinivaas
            Jeff, Yes i tried with HornetQ GA version too and i get the same result. But I could see that the re-distribution working fine in my actual application where i have a cluster of queue nodes. It is only the example code that is not working.
            • 3. Re: Problem with message redistribution in cluster
              jicken

              this is a rather old one but just in case someone comes across this NPE: setting

               

                  <broadcast-groups>

                      <broadcast-group name="my-broadcast-group">

                          <local-bind-address>127.0.0.1</local-bind-address>
                          <local-bind-port>8889</local-bind-port>

                          <local-bind-address>127.0.0.1</local-bind-address>

                          <local-bind-port>8888</local-bind-port>

                          ...

                      </broadcast-group>

                  </broadcast-groups>

               

                  <discovery-groups>

                      <discovery-group name="my-discovery-group">

                        <local-bind-address>127.0.0.1</local-bind-address>

                         ...

                      </discovery-group>

                  </discovery-groups>

              solved it - at least for me.
              You will see the cluster bridges being created.