We are setting up two live JBoss instances, on separate servers that will have JMS Messaging clustered with both servers in the cluster.
Both server instances will share a queue defined on one shared SAN file system. The message producer clients will get the connection factory and use JNDI
to connect to either server in the cluster. My understanding is that if one server instance fails, the producer client Java JMS code will get an exception and
reconnect via the JNDI and then be connected to the remaining live server and JBOSS clustering will take care of reconnecting the sessions and routing the
messages. However, the consumer client is implemented via a package that does not have the ability to do a reconnect after a failure, so we would like to
set them up with two connections from each consumer client... one directly to each live JBoss instance. That way, the cluster can load balance message
handling based on the number of consumers attached, and if one server in the cluster fails, the consumer client will lose one of its connections but still be
able to consume and process messages from the other server.
Is this a viable design? Can the consumer client connect directly to one of the JBoss JMS provider instances when they are defined as being in a cluster?
We are assuming that clustering will cause the producer clients messages to be routed to whichever server remains live after one fails...but with both of them
live would we lose messages that were in the queue on the instance that failed (even though the actual message queue is shared, I assume that the provider
instance keeps track of messages and sessions going through it, and that a fail over scenario would normally cause those to be re-routed to a back up server
but our servers are not defined as back ups)