activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: AMQ-5949 Treat maxSendRetries of -1 as infinite.
Date Wed, 02 Sep 2015 20:37:29 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 5b2aec547 -> 505916b92


AMQ-5949 Treat maxSendRetries of -1 as infinite.

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/505916b9
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/505916b9
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/505916b9

Branch: refs/heads/master
Commit: 505916b92797035c6c41174f220d9e9c9f669b79
Parents: 5b2aec5
Author: Timothy Bish <tabish121@gmail.com>
Authored: Wed Sep 2 16:37:13 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Wed Sep 2 16:37:24 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/network/jms/DestinationBridge.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/505916b9/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
b/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
index 7fc42d1..9595aee 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
@@ -82,6 +82,7 @@ public abstract class DestinationBridge implements Service, MessageListener
{
         return jmsConnector.createReplyToBridge(destination, getConnnectionForConsumer(),
getConnectionForProducer());
     }
 
+    @Override
     public void start() throws Exception {
         if (started.compareAndSet(false, true)) {
             createConsumer();
@@ -89,16 +90,18 @@ public abstract class DestinationBridge implements Service, MessageListener
{
         }
     }
 
+    @Override
     public void stop() throws Exception {
         started.set(false);
     }
 
+    @Override
     public void onMessage(Message message) {
 
         int attempt = 0;
         final int maxRetries = jmsConnector.getReconnectionPolicy().getMaxSendRetries();
 
-        while (started.get() && message != null && attempt <= maxRetries)
{
+        while (started.get() && message != null && (maxRetries == ReconnectionPolicy.INFINITE
|| attempt <= maxRetries)) {
 
             try {
 


Mime
View raw message