[Reconnoiter-devel] [reconnoiter commit] Reconnoiter branch, master, updated. 816f40c059cfdfea53543a1a380b8583b17de4c1

git at labs.omniti.com git at labs.omniti.com
Wed Apr 20 12:54:41 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Reconnoiter".

The branch, master has been updated
       via  816f40c059cfdfea53543a1a380b8583b17de4c1 (commit)
       via  d78a062b173be5f4b8d8969ec29f1dcdd72bc017 (commit)
      from  9cd76427905d19227dd3b2974b32ad32070e99b1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 816f40c059cfdfea53543a1a380b8583b17de4c1
Author: Theo Schlossnagle <jesus at omniti.com>
Date:   Wed Apr 20 12:53:48 2011 -0400

    configurable queue durability

diff --git a/src/java/com/omniti/reconnoiter/broker/RabbitBroker.java b/src/java/com/omniti/reconnoiter/broker/RabbitBroker.java
index 77fb3a3..6aa46b3 100644
--- a/src/java/com/omniti/reconnoiter/broker/RabbitBroker.java
+++ b/src/java/com/omniti/reconnoiter/broker/RabbitBroker.java
@@ -47,6 +47,7 @@ public class RabbitBroker implements IMQBroker  {
   private Integer connectTimeout;
   private Class listenerClass;
   private boolean exclusiveQueue;
+  private boolean durableQueue;
   private Constructor<UpdateListener> con;
 
   @SuppressWarnings("unchecked") 
@@ -61,6 +62,7 @@ public class RabbitBroker implements IMQBroker  {
     this.heartBeat = Integer.parseInt(config.getBrokerParameter("heartbeat", "5000"));
     this.heartBeat = (this.heartBeat + 999) / 1000; // (ms -> seconds, rounding up)
     this.exclusiveQueue = config.getBrokerParameter("exclusivequeue", "false").equals("true");
+    this.durableQueue = config.getBrokerParameter("durablequeue", "false").equals("true");
     this.connectTimeout = Integer.parseInt(config.getBrokerParameter("connect_timeout", "5000"));
     
     String className = config.getBrokerParameter("listenerClass", "com.omniti.reconnoiter.broker.RabbitListener");
@@ -141,11 +143,9 @@ public class RabbitBroker implements IMQBroker  {
                             durable, autoDelete, internal, null);
     autoDelete = true;
 
-    returnedQueueName = channel.queueDeclare(queueName, durable,
+    returnedQueueName = channel.queueDeclare(queueName, durableQueue,
                                              exclusiveQueue, autoDelete, null).getQueue();
     channel.queueBind(returnedQueueName, exchangeName, routingKey);
-    if(!routingKey.equals(""))
-      channel.queueBind(returnedQueueName, exchangeName, "");
   }
   public Channel getChannel() { return channel; }
   

commit d78a062b173be5f4b8d8969ec29f1dcdd72bc017
Author: Theo Schlossnagle <jesus at omniti.com>
Date:   Wed Apr 20 12:53:40 2011 -0400

    make the printing of error message safe again

diff --git a/src/java/com/omniti/reconnoiter/MQListener.java b/src/java/com/omniti/reconnoiter/MQListener.java
index 5347123..7ccf3a7 100644
--- a/src/java/com/omniti/reconnoiter/MQListener.java
+++ b/src/java/com/omniti/reconnoiter/MQListener.java
@@ -76,7 +76,9 @@ public class MQListener implements Runnable {
           broker.disconnect();
         }
         catch (Exception e) {
-          System.err.println("MQ connection failed: " + e.getCause().getMessage());
+          Throwable cause = e.getCause();
+          if(cause == null) cause = e;
+          System.err.println("MQ connection failed: " + cause.getMessage());
         }
         try { Thread.sleep(1000); } catch (InterruptedException ignore) {}
       }

-----------------------------------------------------------------------

Summary of changes:
 src/java/com/omniti/reconnoiter/MQListener.java    |    4 +++-
 .../omniti/reconnoiter/broker/RabbitBroker.java    |    6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Reconnoiter


More information about the Reconnoiter-devel mailing list