Failoverhandling with ClusteredConnections
kevin.lohmann Jun 25, 2010 1:50 AMAccording to Peter Johnson I'll give this a try here:
Hi *,
we are using JBossAS 5.1.0 and therefore the JBoss client uses JBM 1.4.3.GA.
JBoss is configured as a cluster, the cluster contains just one node.
The client creates a ClusteredConnection (default-configuration; SupportsFailover: true; SupportsLoadBalancing: true) and registers a ExceptionListener on this connection, where he tries to reconnect to the cluster.
When I set the cluster-node on heavy, very heavy, load, the jboss-client-code prints something like this
JBoss Messaging server failure detected - waiting for failover to complete... (org.jboss.jms.client.FailoverCommandCenter)
and some time later
JBoss Messaging failover complete (org.jboss.jms.client.FailoverCommandCenter)
. So I guess, communication between JBoss and client was too slow and jboss-client-code performed a failover (1).
But...
I have a jms-topic and one listener on this topic within the client. The topic is configured to cluster. Before the failover everything works fine. After the failover, the jms-console shows me 2 consumer for the topic and I see messages stuck in the topic. The topic-listener never gets triggered again.
So my questions
- Is (1) the right opinion? I know, client and JBoss ping-pong messages to each other. These messages have to arrive within a configurable time.
- I read, when you use ClusteredConnections, don't use ExceptionListener. But I guess, the ExceptionListener will be triggered, when all nodes of the cluster are down. Right? Is this how to use ClusteredConnections?
- Configuring the topic as clustered means, that messages are sent to each cluster-node, doesn't it? The topic-listener is just on client-side - do I have to change the configuration? But then what meaning has this configuration?
- Is this all a known issue/wrong configuration and I just didn't find the right answers on the docs/this forum? The I apologise and would be thankfully if someone could point me to this.
Thx & cheers,
Kevin