Yong, thanks so much for a quick response. My requirement is that we should have a cluster of jms nodes having request and reply queues in it. MDB from a remote machine should consume messages (from request queue) from any of the nodes in cluster, process it (within a transaction) and should send the reply message back (to reply queue) to whichever node that is available in cluster.
Currently this is what is happening:
1. Sent a message to jms cluster and msg was sent to jms node2 and MDB consumed it and sent the the reply msg back to jms node2
2. Sent another message and this time msg was sent to jms node1
3. While MDB was processing the message, I killed jms node1
4. After processing the msg, MDB failed to send the reply message even though jms node2 (that is part of cluster) is still alive. Instead I see the below exception in mdb server logs and also I dont see the message being redelivered to jms node2.
INFO [STDOUT] message This is a text message
INFO [STDOUT] Kill a node and press enter
WARN [RemotingConnectionImpl] Connection failure has been detected: The connection was disconnected because of server shutdown [code=4]
WARN [loggerI18N] Can't find resource for bundle java.util.PropertyResourceBundle, key com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror: [key='com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror']TransactionImple.enlistResource, XAException.XAER_RMERR, < 131075, 28, 26, 494545535110110048495050584951515658521011015654495351585110145535110110048495050584951515658521011015654495351585252 >,
If this is an issue with transaction / message acknowlegment, should not the mdb roll back the transaction and redeliver the request msg back to request queue and the same gets reprocessed by another mdb instance from jms node2 ?
Note: I've attached the mdb code and xmls.
mdb.zip 6.5 K
Thanks for your suggestions. I moved to live-backup model and it works fine so far except for a minor issue. Again this is not an issue with live-backup rather this is just the issue with client reattachment.
I'm Using hornetq-2.2.5-Final. JBboss 5.1.0 GA and OS: Windows XP.
1. Just started the live jms node
2. Sent few messages using MDBRemoteFailoverStaticClientExample.java (that comes with distro) to live node and it worked fine.
3. Then I pulled the network cable of live node for 15 to 20 seconds and reconnected it back.
4. Tried sending more messages using MDBRemoteFailoverStaticClientExample.java and got the below exception from sender java client.
[java] Sending message: This is message 1 - gid : 1
[java] Exception in thread "main" javax.jms.JMSException: The specified network name is no longer available
[java] at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:286)
[java] at org.hornetq.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:287)
[java] at org.hornetq.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:142)
[java] at org.hornetq.jms.client.HornetQMessageProducer.doSend(HornetQMessageProducer.java:451)
[java] at org.hornetq.jms.client.HornetQMessageProducer.send(HornetQMessageProducer.java:199)
[java] at org.hornetq.javaee.example.MDBRemoteFailoverStaticClientGroupMessageExample.main(MDBRemoteFailoverStaticClientGroupMessageExample.java:62)
[java] Caused by: HornetQException[errorCode=6 message=The specified network name is no longer available]
[java] ... 6 more
[java] Java Result: 1
Pls find the xmls attached for live node.
I did all the config that is mentioned as part of the reattach-node example that comes with distro but still I cant get this to work. Pls help!
live.zip 2.2 K
Hi, I'm using windows NFS shared drive as the common storage location for both live and backup. Just now I found that the connection to nfs network gets terminated the moment I pull the cable from live and I do see a warning message from windows that the network path to nfs drive is no longer valid. Is this something specific to windows nfs?
I dont see any issue while killing or stopping live node and live fails over to backup without any issue and even multiple failback failover works fine. MDB and spring listeners are able to failover without any issues. Only the sender client java application causes this issue that too only when the network cable is pulled off from the live node for few seconds,
Also I'm using only IP and not the name.
Note: Currently I'm testing large messages and with this again I get the below exception while sending from java client. I've set the <min-large-message-size>10240</min-large-message-size> in the connection factory of jms. Using the example code that comes with distro for sending a large message (commented the consumer code as I have an MDB for the same)
Are these two issues related by any means?
javax.jms.JMSException at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:286) at org.hornetq.core.client.impl.ClientProducerImpl.largeMessageSendStreamed(ClientProducerImpl.java:542) at org.hornetq.core.client.impl.ClientProducerImpl.largeMessageSend(ClientProducerImpl.java:371) at org.hornetq.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:279) at org.hornetq.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:142) at org.hornetq.jms.client.HornetQMessageProducer.doSend(HornetQMessageProducer.java:451) at org.hornetq.jms.client.HornetQMessageProducer.send(HornetQMessageProducer.java:199) at com.jms.queue.LargeMsgSender.sendMessage(LargeMsgSender.java:91) at com.jms.queue.LargeMsgSender.runExample(LargeMsgSender.java:59) at com.jms.queue.LargeMsgSender.main(LargeMsgSender.java:27) Caused by: HornetQException[errorCode=0 message=null] ... 10 more
Message was edited by: srinivaas venkat
Thanks for the reply.
Please see the following topic where I am trying to get closure on the issue: https://community.jboss.org/message/751516#751516
Reason why I commented and asked for help here because I am seeing the same issue which Venkat reported in his second comment.
I had issues with Jboss 5.1.0 and Hornetq-2.2.5-Final, but then I was able to make the MDBs work in JMS cluster using JBoss 7.1.1-Final and Hornetq 2.2.13-Final version. I used the stand-alone configuration/ static connectors for this to work. Pls find the sample xml attached.
standalone-full-ha.xml 28.4 K