1 Reply Latest reply on Aug 31, 2010 10:35 PM by Jesus Salvo

    Clustering Question - Is what I'm Attempting Even Possible (out of the box)?

    Jeff Watkins Newbie

      Hi,

       

      I've got a working JBOSS 5.1 cluster with an ha-singleton MDB. This works just fine and it fails over etc. However our requirement is to be able to have these ha-singletons start up on specific nodes... e.g.

       

      TopicListenerA starts on Node 1

      TopicListenerB starts on Node 2

      TopicListenerC starts on Node 3

       

      Node 1 cans out, TopicListenerA moves to another node (don't care which at this point), when Node 1 returns, TopicListenerA moves back to Node 1 and everybody is happy.

       

      I've had a google around but I can't seem to find any way of asserting node preference.

       

      Will we have to code all this clustered balancing manually?

       

      Thanks,

      Jeff Watkins

        • 1. Re: Clustering Question - Is what I'm Attempting Even Possible (out of the box)?
          Jesus Salvo Newbie

          Maybe this helps ( See "Server Side Loadbalancing" section ):

           

          http://community.jboss.org/wiki/JBMCluster

           

          To quote:

           

          {quote}

          This behaviour can sometimes cause confusion. The classic case is a user  sets up a cluster of N nodes with a clustered queue, then sends  messages to a single node and wonder why all their consumers on  different nodes aren't processing the messages. This is because the  local node still has spare cpu cycles so there is no point in allowing  other nodes to consume, since that would involve unnecessary network  round tripping. So it's actually the optimal use of resources.

          {quote}

           

          My experience with JMS messaging with JBoss 5.0.1 GA in a cluster is that, in a cluster of two nodes ( A and B ), when a JMS client is  connected to say node A and produces messages to node A, the messages  are always consumed first on node A if there are consumers on node A and  never propagated to node B. Only if node A does not have enough  consumers will it start to propagate to node B.

           

          That is, the JMS messages are never propagated to another node in the cluster so long as there is enough JMS consumers on that node. This kind of behaviour is specific to JBoss Messaging 1.4.x though as far as I know, as other JMS implementations that I know and used ( e.g. iPlanet / SunOne / and now called GlassFish MessageQueue ) will always propagate the messages to other nodes in the cluster.

           

          HornetQ, which will be in JBoss6, will have an entirely different behaviour again I suppose.