2 Replies Latest reply on Dec 19, 2007 3:09 AM by bodrin

    distributed-queue does not always work?

    bodrin

      I'm experiencing problems with the message redistribution between the cluster nodes. I'm running two server nodes jboss-4.2.0.GA with jboss-messaging-1.4.0.SP2 (http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.0.SP2/html/installation.html#install.automated ).

      Running the example with the default settings is OK. I have tried to change the default distributed queue with another one. So I defined it into the destinations-service.xml into both cluster nodes:

      ...
       <mbean code="org.jboss.jms.server.destination.QueueService"
       name="jboss.messaging.destination:service=Queue,name=TestService"
       xmbean-dd="xmdesc/Queue-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       <attribute name="Clustered">true</attribute>
       </mbean>
      ...
      

      (is the configuration ok?)

      ..and then executing the examlpe does not always work:
      D:\research\MessageBus\JBossMQ\jboss-messaging-1.4.0.SP2\examples\distributed-queue>ant -Dexample.queue.name=TestService
      Buildfile: build.xml
      
      identify:
       [echo] ###########################################################################
       [echo] # Running the DISTRIBUTED QUEUE example #
       [echo] ###########################################################################
       [echo] The queue: TestService
       [echo] The client jar: ../..//jboss-messaging-client.jar
      
      sanity-check:
      
      init:
      
      compile:
      
      run:
       [java] Distributed queue /queue/TestService exists
       [java] The message was successfully sent to the distributed queue
       [java] java.lang.NullPointerException
       [java] at org.jboss.example.jms.distributedqueue.DistributedQueueExample.example(DistributedQueueExample.java:112)
       [java] at org.jboss.example.jms.common.ExampleSupport.run(ExampleSupport.java:147)
       [java] at org.jboss.example.jms.distributedqueue.DistributedQueueExample.main(DistributedQueueExample.java:167)
       [java]
       [java] #####################
       [java] ### FAILURE! ###
       [java] #####################
      
      BUILD FAILED
      


      Then if I check the jbm_msg table I see that the message is there but I do not always get it.

        • 1. Re: distributed-queue does not always work?
          clebert.suconic

          The configuration seems ok to me.


          Possible things you should look at:

          - Are you sure you didn't change anything on the test?
          - Can you try the same test again, after dropping/creating your database (or clearing the data on the tables).
          - Are you sure you have your UDP working fine?
          - Do you have both nodes on the same box I assume? If not, check your JGroups configs.

          • 2. Re: distributed-queue does not always work?
            bodrin

            - I have not changed anything on the test
            - After dropping/creating the DB the test is OK
            - UDP should be working ok
            - both nodes are on the same box (ports-01,ports-02)

            May be next time I should backup the database first in order to analyse the problem..