Load balanced MDBs on cluster: subscription problems?
nic7834 Jul 5, 2004 2:56 PMHi
I am following the wiki:
http://www.jboss.org/wiki/Wiki.jsp?page=JBossMQHA
Have successfully:
1. Setup 2 node cluster, with HA MQ on master node
2. Got JMS authentication/authorization using database
3. Deployed JMS producer/consumer on master node (with JMS persistence to database)
Problem is that when i deploy the same package on the second node, the MDBs there try to connect on the same durable subscription:
2004-07-05 13:19:35,842 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Reconnected to JMS provider
2004-07-05 13:19:35,842 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] JMS provider failure detected:
javax.jms.IllegalStateException: The durable subscription is already in use. DurableSubscription[clientId=MonitorUID1 name=MonitorDS selector=null]
at org.jboss.mq.server.JMSTopic.addSubscriber(JMSTopic.java:75)
at org.jboss.mq.server.ClientConsumer.addSubscription(ClientConsumer.java:133)
at org.jboss.mq.server.JMSDestinationManager.subscribe(JMSDestinationManager.java:601)
at org.jboss.mq.server.JMSServerInterceptorSupport.subscribe(JMSServerInterceptorSupport.java:297)
at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:142)
at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:816)
at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:297)
at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:160)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:356)
at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:534)
I understand that the MDBs on the master node are using up the durable subscription ID. My question is how am I supposed to get unique subscription IDs for each node when the cluster is increased.
Something like this:
String randomClientID = generateRandomID();
topicConnection.setClientID(randomClientID);
topicSession.createDurableSubscriber(topic, "MySubscriptionName");
I don't think this can work because of the JMS authentication in place. Should I just use the guest account then?
Thanks
Nic