3 Replies Latest reply on Aug 11, 2008 9:53 AM by daniel.gaiottino

    Jboss Messaging 1.4.0 SP3 and Message Redistribution / Perfo

    daniel.gaiottino

      Hi,

      Im using Jboss 4.2.3 and I've been working to set up Jboss Messaging in a cluster and can't seem to get reliable Message Redistribution working.

      I have an app that puts alot of messages on a queue (1000+). The queue is clustered according to the JMX console (I've even looked in the JBM_POSTOFFICE table) but I'm not seeing any message redistribution to the MDBs on my clustered server. Instead the first server which put all the messages on the queue processes all of them.

      I've read that the local queue will be prioritized but I'm seeing a significant load spike on the first server while it's processing the messages so I would expect it to hand some over to the other JBoss to share the load.

      I've played around with the ClusterPullConnectionFactory setting PrefetchSize to 1 but that had no effect. I even tried setting the SupportsLoadBalancing to true even though this is not recommended but I didn't see a different behaviour.

      Another thing I haven't been able to find is where to configure the MaxPoolSize of the MDBs (I thought reducing this might make it share the load) but setting MaximumSize to 5 for message-driven-bean in standardjboss.xml had no effect. It's still set to the default of 15. Where do I chance this?

      Things I've noticed:
      - I'm running mysql clustered and both Jboss servers use this database. In JBM_POSTOFFICE I have 2 entries for my clustered queue. Same name but different NODE_ID. Both have CLUSTERED set to Y. Does JBoss bridge these 2 queues to create the clustered queue?
      - In the JMX consoles even though I have the queue clustered, and the MDB deployed on both machines, ConsumerCount is 1 on both. I was hoping to see 1 for each machine in the cluster (so 2).

      I'm running out of ideas to test to I decided to write for some help on the forums. Hopefully someone will be able to shed some light on why I cant get Message Redistribution working properly.

      Cheers,
      - Daniel

        • 1. Re: Jboss Messaging 1.4.0 SP3 and Message Redistribution / P
          daniel.gaiottino

          Still looking for help with this issue. I've run another test where I set maxSession to 1 in my MDB and added a Thread.sleep at the end of the code. When I run it I can see that only 1 MDB handles the messages and does so once per second because of the sleep. I'm still not seeing any message redistribution though.

          All the messages are handled by one server even though I'd expect the second server pick some off the queue since.

          I even tried setting PrefetchSize to 1 again but that had no effect.

          Anyone able to shed some light here?

          • 2. Re: Jboss Messaging 1.4.0 SP3 and Message Redistribution / P
            timfox

            Did you run the examples after installing to validate the installation?

            There's a message redistribution example. If it doesn't work it means your installation is messed up. If it does work, see how it differs from your program to work out what is wrong.

            • 3. Re: Jboss Messaging 1.4.0 SP3 and Message Redistribution / P
              daniel.gaiottino

              I ran the tests and they passed.

              Decided to look at the code and as i read the line

              cf = (ConnectionFactory)ic.lookup("/ClusteredConnectionFactory");

              it dawned on me... I was still using the XAConnectionFactory in my code.

              It was SBS ("Skit Bakom Sparkarna" as we say in Sweden) or PEBKAC after all.

              Works as expected now.