JMS bridge doesn't complain, but no msg in destination
atijms Mar 16, 2011 11:47 AMI've set up the HornetQ JMS bridge between two EAR applications running on JBoss AS 6 instances on different servers (using the default supplied HornetQ).
The bridge reports that everything is okay. There is the message about succeeding to connect and when I send a message to the local source queue, it is succesfully removed (I used twiddle.sh to verify this).
There are no exceptions or errors reported by the bridge, yet there does not seem to be any communication going on to the remote destination.
I patched the bridge to log its messages at INFO, and everything seems to be okay:
2011-03-15 22:38:44,246 INFO (pool-11-thread-2) org.hornetq.jms.bridge.impl.patch.trace.JMSBridgeImpl$BatchTimeChecker@13123be5 woke up 2011-03-15 22:38:44,246 INFO (pool-11-thread-2) org.hornetq.jms.bridge.impl.patch.trace.JMSBridgeImpl$BatchTimeChecker@13123be5 waiting for 2008 2011-03-15 22:38:46,782 INFO (pool-11-thread-2) org.hornetq.jms.bridge.impl.patch.trace.JMSBridgeImpl$BatchTimeChecker@13123be5 woke up 2011-03-15 22:38:46,782 INFO (pool-11-thread-2) org.hornetq.jms.bridge.impl.patch.trace.JMSBridgeImpl$BatchTimeChecker@13123be5 waited enough 2011-03-15 22:38:46,782 INFO (pool-11-thread-2) org.hornetq.jms.bridge.impl.patch.trace.JMSBridgeImpl$BatchTimeChecker@13123be5 got some messages so sending batch 2011-03-15 22:38:46,782 INFO (pool-11-thread-2) Sending batch of 1 messages 2011-03-15 22:38:46,782 INFO (pool-11-thread-2) Adding old message id in Message header 2011-03-15 22:38:46,786 INFO (pool-11-thread-2) Sending message HornetQMessage[ID:981c5fc0-4f4c-11e0-9367-00163e6c3f7b]:PERSISTENT 2011-03-15 22:38:46,786 INFO (pool-11-thread-2) Sent message HornetQMessage[ID:9b9b2641-4f4c-11e0-9367-00163e6c3f7b]:PERSISTENT 2011-03-15 22:38:46,786 INFO (pool-11-thread-2) Delisting resources from tx 2011-03-15 22:38:46,806 INFO (pool-11-thread-2) Delisted resources from tx 2011-03-15 22:38:46,806 INFO (pool-11-thread-2) Committing JTA transaction 2011-03-15 22:38:46,918 INFO (pool-11-thread-2) Committed JTA transaction 2011-03-15 22:38:46,918 INFO (pool-11-thread-2) Starting JTA transaction 2011-03-15 22:38:46,918 INFO (pool-11-thread-2) Started JTA transaction 2011-03-15 22:38:46,918 INFO (pool-11-thread-2) Enlisting resources in tx 2011-03-15 22:38:46,918 INFO (pool-11-thread-2) Enlisted resources in tx 2011-03-15 22:38:46,918 INFO (pool-11-thread-2) org.hornetq.jms.bridge.impl.patch.trace.JMSBridgeImpl$BatchTimeChecker@13123be5 sent batch 2011-03-15 22:38:46,918 INFO (pool-11-thread-2) org.hornetq.jms.bridge.impl.patch.trace.JMSBridgeImpl$BatchTimeChecker@13123be5 waiting for 5000
Only, as mentioned the message simply doesn't arrive in the remote destination.
Now comes the awkward thing, when I kill the remote server, the exact same sequence of log lines appears and there is no exception whatsoever. The messages seem to be lost in thin air. I also checked the DLQ queue, but there's nothing there.
Only when I restart the server on which the bridge lives, while the target server is still down, the bridge starts complaining that it can't connect.
So there are two problems:
- When everything should be connected (the target destination can be retrieved from remote JNDI), the message just doesn't arrive.
- When the target server is down, the bridge doesn't complain about this at all.
When I run both EAR applications on my localhost (either deployed to the same JBoss AS instance or two different ones) the messages do arrive. I'm very puzzled about this and any help would be highly appreciated.