You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/02/29 08:43:48 UTC

[1/4] camel git commit: Hazelcast :: Aggregation Repository

Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 08d97d879 -> a092bb3cb
  refs/heads/camel-2.16.x b7624cb81 -> c7e57023e
  refs/heads/master ea647c7d5 -> 064fe8b10


Hazelcast :: Aggregation Repository

Removes clear cache operation at stop.
As Hazelcast is used in a clustered environment, clearing the cache when the bundle
stops prevents other instances running somewhere else to take over the pending
aggregations.


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

Branch: refs/heads/master
Commit: 064fe8b10d05cd1c3d4f50cecd4662053006f1c5
Parents: ca28bf5
Author: Frederic Gendebien <fr...@gmail.com>
Authored: Sat Feb 27 20:36:50 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Feb 29 08:24:46 2016 +0100

----------------------------------------------------------------------
 .../aggregate/hazelcast/HazelcastAggregationRepository.java     | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/064fe8b1/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java b/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
index a230c8c..530bd8c 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
@@ -408,10 +408,7 @@ public class HazelcastAggregationRepository extends ServiceSupport
 
     @Override
     protected void doStop() throws Exception {
-        if (useRecovery) {
-            persistedCache.clear();
-        }
-        cache.clear();
+        //noop
         if (useLocalHzInstance) {
             hzInstance.getLifecycleService().shutdown();
         }


[2/4] camel git commit: CAMEL-9648: Polished javadoc

Posted by da...@apache.org.
CAMEL-9648: Polished javadoc

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

Branch: refs/heads/master
Commit: ca28bf54e73d827774be085e3e52bcf14005c9b3
Parents: ea647c7
Author: Preben Asmussen <pr...@gmail.com>
Authored: Sun Feb 28 15:14:05 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Feb 29 08:24:46 2016 +0100

----------------------------------------------------------------------
 .../camel-ironmq/src/main/docs/ironmq.adoc      | 20 +++++++-------
 .../component/ironmq/IronMQConfiguration.java   | 28 ++++++++++++--------
 2 files changed, 28 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ca28bf54/components/camel-ironmq/src/main/docs/ironmq.adoc
----------------------------------------------------------------------
diff --git a/components/camel-ironmq/src/main/docs/ironmq.adoc b/components/camel-ironmq/src/main/docs/ironmq.adoc
index b32489c..25893fe 100644
--- a/components/camel-ironmq/src/main/docs/ironmq.adoc
+++ b/components/camel-ironmq/src/main/docs/ironmq.adoc
@@ -40,6 +40,7 @@ Options
 ^^^^^^^
 
 
+
 // endpoint options: START
 The ironmq component supports 31 endpoint options which are listed below:
 
@@ -49,19 +50,19 @@ The ironmq component supports 31 endpoint options which are listed below:
 | queueName | common |  | String | *Required* The name of the IronMQ queue
 | client | common |  | Client | Reference to a io.iron.ironmq.Client in the Registry.
 | ironMQCloud | common | https://mq-aws-us-east-1.iron.io | String | IronMq Cloud url. See http://dev.iron.io/mq/reference/clouds/ for valid options
-| preserveHeaders | common | false | boolean | Should camel message headers be preserved when publishing messages
-| projectId | common |  | String | IronMq projectId
-| token | common |  | String | IronMq token
-| batchDelete | consumer | false | boolean | Shold messages be deleted in one batch or one at the time
+| preserveHeaders | common | false | boolean | Should message headers be preserved when publishing messages. This will add the Camel headers to the Iron MQ message as a json payload with a header list and a message body. Useful when Camel is both consumer and producer.
+| projectId | common |  | String | IronMQ projectId
+| token | common |  | String | IronMQ token
+| batchDelete | consumer | false | boolean | Should messages be deleted in one batch. This will limit the number of api requests since messages are deleted in one request instead of one pr. exchange. If enabled care should be taken that the consumer is idempotent when processing exchanges.
 | bridgeErrorHandler | consumer | false | boolean | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
-| concurrentConsumers | consumer | 1 | Integer | The number of concurrent consumers.
-| maxMessagesPerPoll | consumer | 1 | int | Number of messages to poll pr. call
+| concurrentConsumers | consumer | 1 | int | The number of concurrent consumers.
+| maxMessagesPerPoll | consumer | 1 | int | Number of messages to poll pr. call. Maximum is 100.
 | sendEmptyMessageWhenIdle | consumer | false | boolean | If the polling consumer did not poll any files you can enable this option to send an empty message (no body) instead.
-| timeout | consumer | 60 | int | sets the timeout
-| wait | consumer |  | int | Sets the wait
+| timeout | consumer | 60 | int | After timeout (in seconds) item will be placed back onto the queue.
+| wait | consumer |  | int | Time in seconds to wait for a message to become available. This enables long polling. Default is 0 (does not wait) maximum is 30.
 | exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
 | pollStrategy | consumer (advanced) |  | PollingConsumerPollStrategy | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.
-| visibilityDelay | producer |  | int | Set's the visibility delay in seconds.
+| visibilityDelay | producer |  | int | The item will not be available on the queue until this many seconds have passed. Default is 0 seconds.
 | exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange
 | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
 | backoffErrorThreshold | scheduler |  | int | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.
@@ -80,6 +81,7 @@ The ironmq component supports 31 endpoint options which are listed below:
 |=======================================================================
 // endpoint options: END
 
+
 [[IronMQ-IronMQComponentOptions]]
 IronMQComponent Options
 ^^^^^^^^^^^^^^^^^^^^^^^

http://git-wip-us.apache.org/repos/asf/camel/blob/ca28bf54/components/camel-ironmq/src/main/java/org/apache/camel/component/ironmq/IronMQConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-ironmq/src/main/java/org/apache/camel/component/ironmq/IronMQConfiguration.java b/components/camel-ironmq/src/main/java/org/apache/camel/component/ironmq/IronMQConfiguration.java
index 7bd160b..8dae1b6 100644
--- a/components/camel-ironmq/src/main/java/org/apache/camel/component/ironmq/IronMQConfiguration.java
+++ b/components/camel-ironmq/src/main/java/org/apache/camel/component/ironmq/IronMQConfiguration.java
@@ -51,7 +51,7 @@ public class IronMQConfiguration {
 
     // consumer properties
     @UriParam(defaultValue = "1", label = "consumer")
-    private Integer concurrentConsumers = 1;
+    private int concurrentConsumers = 1;
     
     @UriParam(label = "consumer")
     private boolean batchDelete;
@@ -76,14 +76,14 @@ public class IronMQConfiguration {
         this.client = client;
     }
 
-    public Integer getConcurrentConsumers() {
+    public int getConcurrentConsumers() {
         return concurrentConsumers;
     }
 
     /**
      * The number of concurrent consumers.
      */
-    public void setConcurrentConsumers(Integer concurrentConsumers) {
+    public void setConcurrentConsumers(int concurrentConsumers) {
         this.concurrentConsumers = concurrentConsumers;
     }
 
@@ -92,7 +92,7 @@ public class IronMQConfiguration {
     }
 
     /**
-     * IronMq projectId
+     * IronMQ projectId
      */
     public void setProjectId(String projectId) {
         this.projectId = projectId;
@@ -103,7 +103,7 @@ public class IronMQConfiguration {
     }
 
     /**
-     * IronMq token
+     * IronMQ token
      */
     public void setToken(String token) {
         this.token = token;
@@ -136,7 +136,7 @@ public class IronMQConfiguration {
     }
 
     /**
-     * sets the timeout
+     * After timeout (in seconds), item will be placed back onto the queue.
      */
     public void setTimeout(int timeout) {
         this.timeout = timeout;
@@ -147,7 +147,7 @@ public class IronMQConfiguration {
     }
 
     /**
-     * Number of messages to poll pr. call
+     * Number of messages to poll pr. call. Maximum is 100.
      */
     public void setMaxMessagesPerPoll(int maxMessagesPerPoll) {
         this.maxMessagesPerPoll = maxMessagesPerPoll;
@@ -158,7 +158,8 @@ public class IronMQConfiguration {
     }
 
     /**
-     * Set's the visibility delay in seconds.
+     * The item will not be available on the queue until this many seconds have passed. 
+     * Default is 0 seconds.
      */
     public void setVisibilityDelay(int visibilityDelay) {
         this.visibilityDelay = visibilityDelay;
@@ -169,7 +170,9 @@ public class IronMQConfiguration {
     }
 
     /**
-     * Should camel message headers be preserved when publishing messages
+     * Should message headers be preserved when publishing messages.
+     * This will add the Camel headers to the Iron MQ message as a json payload with a header list, and a message body.
+     * Useful when Camel is both consumer and producer.
      */
     public void setPreserveHeaders(boolean preserveHeaders) {
         this.preserveHeaders = preserveHeaders;
@@ -180,7 +183,9 @@ public class IronMQConfiguration {
     }
 
     /**
-     * Shold messages be deleted in one batch or one at the time
+     * Should messages be deleted in one batch. 
+     * This will limit the number of api requests since messages are deleted in one request, instead of one pr. exchange. 
+     * If enabled care should be taken that the consumer is idempotent when processing exchanges.
      */
     public void setBatchDelete(boolean batchDelete) {
         this.batchDelete = batchDelete;
@@ -191,7 +196,8 @@ public class IronMQConfiguration {
     }
 
     /**
-     * Sets the wait
+     * Time in seconds to wait for a message to become available. 
+     * This enables long polling. Default is 0 (does not wait), maximum is 30.
      */
     public void setWait(int wait) {
         this.wait = wait;


[3/4] camel git commit: Hazelcast :: Aggregation Repository

Posted by da...@apache.org.
Hazelcast :: Aggregation Repository

Removes clear cache operation at stop.
As Hazelcast is used in a clustered environment, clearing the cache when the bundle
stops prevents other instances running somewhere else to take over the pending
aggregations.


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

Branch: refs/heads/camel-2.16.x
Commit: c7e57023e177e779ce2b40701a15b7276d0d987a
Parents: b7624cb
Author: Frederic Gendebien <fr...@gmail.com>
Authored: Sat Feb 27 20:36:50 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Feb 29 08:43:21 2016 +0100

----------------------------------------------------------------------
 .../aggregate/hazelcast/HazelcastAggregationRepository.java     | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c7e57023/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java b/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
index 65207c2..e4a6723 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
@@ -399,10 +399,7 @@ public class HazelcastAggregationRepository extends ServiceSupport
 
     @Override
     protected void doStop() throws Exception {
-        if (useRecovery) {
-            persistedCache.clear();
-        }
-        cache.clear();
+        //noop
         if (useLocalHzInstance) {
             hzInstance.getLifecycleService().shutdown();
         }


[4/4] camel git commit: Hazelcast :: Aggregation Repository

Posted by da...@apache.org.
Hazelcast :: Aggregation Repository

Removes clear cache operation at stop.
As Hazelcast is used in a clustered environment, clearing the cache when the bundle
stops prevents other instances running somewhere else to take over the pending
aggregations.


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

Branch: refs/heads/camel-2.15.x
Commit: a092bb3cbd03a40fc19b13860f94402d8c32059d
Parents: 08d97d8
Author: Frederic Gendebien <fr...@gmail.com>
Authored: Sat Feb 27 20:36:50 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Feb 29 08:43:38 2016 +0100

----------------------------------------------------------------------
 .../aggregate/hazelcast/HazelcastAggregationRepository.java     | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a092bb3c/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java b/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
index e67be62..915bd19 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
@@ -400,10 +400,7 @@ public final class HazelcastAggregationRepository extends ServiceSupport
 
     @Override
     protected void doStop() throws Exception {
-        if (useRecovery) {
-            persistedCache.clear();
-        }
-        cache.clear();
+        //noop
         if (useLocalHzInstance) {
             hzInstance.getLifecycleService().shutdown();
         }