0 Replies Latest reply on Nov 15, 2005 12:25 AM by Michael Jordan

    Questions about JMS load-balancing and failover

    Michael Jordan Newbie

      WIN 2K Server, JDK 5.0, JBoss 4.0.2

      JBoss instance1 : ( primary )
      JBoss instance2 :
      JBoss instance3 :

      Configurate HAJMS based on article http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossMQHAOverview. Deploy Message Driven Bean to all/farm, start all configuration of instance1, instance2, instance3. All JBoss instances join DefaultPartition.

      Client application keeps sending messages, all instances can handle messages.
      Client code:

      Properties props = new Properties();

      props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
      props.put(Context.PROVIDER_URL, ",10.10.12.:1100," );

      InitialContext ctx = new InitialContext(props);
      QueueConnectionFactory qf = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
      javax.jms.Queue destination = (javax.jms.Queue)ctx.lookup("queue/testQueue");

      Load-balancing and failover functionalities work properly.

      1. When client application is sending messages to one instance, if primary instance was down, the load-balancing and failover functionalities of other secondary instances will not work. WHY, and HOW TO RESOLVE IT?
      2. When client application keeps sending messages to instance2( secondary instance ), unplug the cable of instance2, other instances will handle left messages. After a while, replug the cable of instance2, and client application keeps seeding to instance2, no instance handles incoming messages, and all messages will be recorded into JMS_MESSAGES table. WHY, and HOW TO RESOLVE IT?
      3. How to find the primary instance of the cluster?