airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: rabbitmq channel closed issue
Date Thu, 08 Oct 2015 17:49:14 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 51ed55072 -> ec75efb0e


rabbitmq channel closed issue


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

Branch: refs/heads/master
Commit: ec75efb0ed21ecf8dc33c1db7300450a13bbd43e
Parents: 51ed550
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Thu Oct 8 13:49:03 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Thu Oct 8 13:49:03 2015 -0400

----------------------------------------------------------------------
 .../messaging/core/impl/RabbitMQProcessLaunchConsumer.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ec75efb0/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQProcessLaunchConsumer.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQProcessLaunchConsumer.java
b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQProcessLaunchConsumer.java
index 8f0ce29..855ae27 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQProcessLaunchConsumer.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQProcessLaunchConsumer.java
@@ -274,7 +274,13 @@ public class RabbitMQProcessLaunchConsumer {
 
     public void sendAck(long deliveryTag){
         try {
-            channel.basicAck(deliveryTag,false);
+            if (channel.isOpen()){
+                channel.basicAck(deliveryTag,false);
+            }else {
+                channel = connection.createChannel();
+                channel.basicQos(prefetchCount);
+                channel.basicAck(deliveryTag, false);
+            }
         } catch (IOException e) {
             logger.error(e.getMessage(), e);
         }


Mime
View raw message