FAQ
Updated Branches:
   refs/heads/master 82222bc91 -> f3509ddc8


CAMEL-6534 Added two extra fields on the exchange with thanks to Stephen


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

Branch: refs/heads/master
Commit: f3509ddc8a2c85d6d5ec9e4d77f160910f44761c
Parents: 82222bc
Author: Willem Jiang <ningjiang@apache.org>
Authored: Mon Jul 22 11:16:12 2013 +0800
Committer: Willem Jiang <ningjiang@apache.org>
Committed: Mon Jul 22 11:17:03 2013 +0800

----------------------------------------------------------------------
  .../component/rabbitmq/RabbitMQConsumer.java | 8 +++++++-
  .../component/rabbitmq/RabbitMQEndpoint.java | 18 ++++++++++++++++++
  2 files changed, 25 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f3509ddc/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
index d807df6..2f78d00 100644
--- a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
+++ b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
@@ -18,6 +18,7 @@
  package org.apache.camel.component.rabbitmq;

  import java.io.IOException;
+import java.util.HashMap;
  import java.util.concurrent.ExecutorService;

  import com.rabbitmq.client.AMQP;
@@ -58,7 +59,12 @@ public class RabbitMQConsumer extends DefaultConsumer {
          channel = conn.createChannel();
          log.debug("Using channel {}", channel);

- channel.exchangeDeclare(endpoint.getExchangeName(), "direct", true);
+ channel.exchangeDeclare(endpoint.getExchangeName(),
+ "direct",
+ endpoint.isDurable(),
+ endpoint.isAutoDelete(),
+ new HashMap<String, Object>());
+
          channel.queueDeclare(endpoint.getQueue(), true, false, false, null);
          channel.queueBind(endpoint.getQueue(), endpoint.getExchangeName(),
                  endpoint.getRoutingKey() == null ? "" : endpoint.getRoutingKey());

http://git-wip-us.apache.org/repos/asf/camel/blob/f3509ddc/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
index 933a954..d43a73e 100644
--- a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
+++ b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
@@ -47,6 +47,8 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
      private int threadPoolSize = 10;
      private int portNumber;
      private boolean autoAck = true;
+ private boolean autoDelete = true;
+ private boolean durable = true;
      private String queue = String.valueOf(UUID.randomUUID().toString().hashCode());
      private String exchangeName;
      private String routingKey;
@@ -93,6 +95,22 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
      public String getQueue() {
          return queue;
      }
+
+ public boolean isAutoDelete() {
+ return autoDelete;
+ }
+
+ public void setAutoDelete(boolean autoDelete) {
+ this.autoDelete = autoDelete;
+ }
+
+ public boolean isDurable() {
+ return durable;
+ }
+
+ public void setDurable(boolean durable) {
+ this.durable = durable;
+ }

      public String getRoutingKey() {
          return routingKey;

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriescamel
postedJul 22, '13 at 3:18a
activeJul 22, '13 at 3:18a
posts1
users1
websitecamel.apache.org

1 user in discussion

Ningjiang: 1 post

People

Translate

site design / logo © 2018 Grokbase