camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject git commit: CAMEL-7967 write info log when RabbitMQConsumer cannot connect to the server
Date Mon, 27 Oct 2014 13:53:29 GMT
Repository: camel
Updated Branches:
  refs/heads/master ef039d532 -> 183bbb958


CAMEL-7967 write info log when RabbitMQConsumer cannot connect to the server


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/183bbb95
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/183bbb95
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/183bbb95

Branch: refs/heads/master
Commit: 183bbb958a9c9335699bc80a2717f249951dd57a
Parents: ef039d5
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Mon Oct 27 20:21:10 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Mon Oct 27 20:21:51 2014 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/rabbitmq/RabbitMQConsumer.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/183bbb95/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
index fa4893c..3201887 100644
--- a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
+++ b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
@@ -118,6 +118,7 @@ public class RabbitMQConsumer extends DefaultConsumer {
             openConnection();
             startConsumers();
         } catch (Exception e) {
+            log.info("Connection failed, will start background thread to retry!", e);
             // Open connection, and start message listener in background
             Integer networkRecoveryInterval = getEndpoint().getNetworkRecoveryInterval();
             final long connectionRetryInterval = networkRecoveryInterval != null &&
networkRecoveryInterval > 0 ? networkRecoveryInterval : 100L;
@@ -313,7 +314,7 @@ public class RabbitMQConsumer extends DefaultConsumer {
                     openConnection();
                     connectionFailed = false;
                 } catch (Exception e) {
-                    log.debug("Connection failed, will retry in {}" + connectionRetryInterval
+ "ms", e);
+                    log.info("Connection failed, will retry in {}" + connectionRetryInterval
+ "ms", e);
                     Thread.sleep(connectionRetryInterval);
                 }
             }


Mime
View raw message