You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2015/03/27 16:31:58 UTC
airavata git commit: making worker queue configurable to durable and
non-durable
Repository: airavata
Updated Branches:
refs/heads/master f25af64c0 -> a8cf35fc7
making worker queue configurable to durable and non-durable
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a8cf35fc
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a8cf35fc
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a8cf35fc
Branch: refs/heads/master
Commit: a8cf35fc7acc8809f2a8aa0183327cfca3345aff
Parents: f25af64
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Fri Mar 27 11:31:53 2015 -0400
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Fri Mar 27 11:31:53 2015 -0400
----------------------------------------------------------------------
.../server/src/main/resources/airavata-server.properties | 1 +
.../src/main/resources/airavata-server.properties | 2 ++
.../org/apache/airavata/messaging/core/MessagingConstants.java | 1 +
.../messaging/core/impl/RabbitMQTaskLaunchConsumer.java | 5 ++++-
4 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/a8cf35fc/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 38a6fdd..7410d7f 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -226,6 +226,7 @@ status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchPublisher
rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+durable.queue=false
activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQPublisher
rabbitmq.exchange.name=airavata_rabbitmq_exchange
http://git-wip-us.apache.org/repos/asf/airavata/blob/a8cf35fc/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties b/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
index dba849c..4e2fef7 100644
--- a/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
+++ b/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
@@ -206,6 +206,8 @@ activity.listeners=org.apache.airavata.gfac.core.monitor.AiravataJobStatusUpdato
publish.rabbitmq=false
status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchPublisher
+durable.queue=false
+
rabbitmq.broker.url=amqp://localhost:5672
rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
http://git-wip-us.apache.org/repos/asf/airavata/blob/a8cf35fc/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/MessagingConstants.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/MessagingConstants.java b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/MessagingConstants.java
index 07b39e7..d2e086d 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/MessagingConstants.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/MessagingConstants.java
@@ -29,4 +29,5 @@ public abstract class MessagingConstants {
public static final String RABBIT_ROUTING_KEY = "routingKey";
public static final String RABBIT_QUEUE= "queue";
public static final String RABBIT_CONSUMER_TAG = "consumerTag";
+ public static final String DURABLE_QUEUE="durable.queue";
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a8cf35fc/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 9cad924..52cf7e0 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
@@ -51,10 +51,12 @@ public class RabbitMQTaskLaunchConsumer {
private Connection connection;
private Channel channel;
private Map<String, QueueDetails> queueDetailsMap = new HashMap<String, QueueDetails>();
+ private boolean durableQueue;
public RabbitMQTaskLaunchConsumer() throws AiravataException {
try {
url = ServerSettings.getSetting(MessagingConstants.RABBITMQ_BROKER_URL);
+ durableQueue = Boolean.parseBoolean(ServerSettings.getSetting(MessagingConstants.DURABLE_QUEUE));
taskLaunchExchangeName = ServerSettings.getSetting(MessagingConstants.RABBITMQ_TASK_LAUNCH_EXCHANGE_NAME);
createConnection();
} catch (ApplicationSettingsException e) {
@@ -117,7 +119,8 @@ public class RabbitMQTaskLaunchConsumer {
}
queueName = channel.queueDeclare().getQueue();
} else {
- channel.queueDeclare(queueName, true, false, false, null);
+
+ channel.queueDeclare(queueName, durableQueue, false, false, null);
}
final String id = getId(keys, queueName);