Author: ataylor
Date: 2011-01-25 04:07:51 -0500 (Tue, 25 Jan 2011)
New Revision: 10143
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
Log:
https://issues.jboss.org/browse/JBPAPP-5807 - fixed, handle exception on send
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-01-25
03:17:50 UTC (rev 10142)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-01-25
09:07:51 UTC (rev 10143)
@@ -378,9 +378,23 @@
// Preserve the original address
dest = message.getAddress();
}
+ //if we failover during send then there is a chance that the
+ //that this will throw a disconnect, we need to remove the message
+ //from the acks so it will get resent, duplicate detection will cope
+ //with any messages resent
+ try
+ {
+ producer.send(dest, message);
+ }
+ catch (HornetQException e)
+ {
+ log.warn("Unable to send message, will try again once bridge
reconnects");
- producer.send(dest, message);
+ refs.remove(ref);
+ return HandleStatus.BUSY;
+ }
+
return HandleStatus.HANDLED;
}
}