You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/06/10 17:33:15 UTC
airavata git commit: basicRecovery for channel
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 <ch...@apache.org>
Authored: Wed Jun 10 11:33:09 2015 -0400
Committer: Chathuri Wimalasena <ch...@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;