airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: basicRecovery for channel
Date Wed, 10 Jun 2015 15:33:15 GMT
Repository: airavata
Updated Branches:
  refs/heads/airavata-0.15-release-branch c3a8b77d6 -> 1cf6bd32b


basicRecovery for channel


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/1cf6bd32
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/1cf6bd32
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/1cf6bd32

Branch: refs/heads/airavata-0.15-release-branch
Commit: 1cf6bd32b02a9a6f4a295f9e78c7cb64cbf31d3f
Parents: c3a8b77
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Wed Jun 10 11:33:09 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Wed Jun 10 11:33:09 2015 -0400

----------------------------------------------------------------------
 .../messaging/core/impl/RabbitMQTaskLaunchConsumer.java        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1cf6bd32/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java
b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java
index 86ea669..c926a8e 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java
@@ -89,19 +89,20 @@ public class RabbitMQTaskLaunchConsumer {
             connection.addShutdownListener(new ShutdownListener() {
                 public void shutdownCompleted(ShutdownSignalException cause) {
                     log.error("**************** ######## RabbitMQ connection shutting down
********** #######");
+
                 }
             });
             log.info("connected to rabbitmq: " + connection + " for " + taskLaunchExchangeName);
 
             channel = connection.createChannel();
+            channel.basicRecover(true);
             channel.basicQos(prefetchCount);
             channel.addShutdownListener(new ShutdownListener() {
                 @Override
                 public void shutdownCompleted(ShutdownSignalException e) {
-                    log.error("************ ######### RabbitMQ channel shutting down **********
#######");
+                    log.error("************ ######### RabbitMQ channel shutting down **********
#######", e);
                 }
             });
-
 //            channel.exchangeDeclare(taskLaunchExchangeName, "fanout");
 
         } catch (Exception e) {
@@ -114,6 +115,7 @@ public class RabbitMQTaskLaunchConsumer {
     public void reconnect() throws AiravataException{
         if(messageHandler!=null) {
             try {
+                createConnection();
                 listen(messageHandler);
             } catch (AiravataException e) {
                 String msg = "could not open channel for exchange " + taskLaunchExchangeName;


Mime
View raw message