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 2017/06/17 20:03:30 UTC

[1/3] camel git commit: checkstyle - move import

Repository: camel
Updated Branches:
  refs/heads/master 1dd8bf36d -> a7593280b


checkstyle - move import


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

Branch: refs/heads/master
Commit: 713c7b8e5dd66f8b827c87fbc91452f4fe8d5c04
Parents: 12d5182
Author: Ann Katrin Gagnat <an...@gmail.com>
Authored: Thu Jun 15 21:27:30 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jun 17 21:57:14 2017 +0200

----------------------------------------------------------------------
 .../hazelcast/HazelcastSedaRecoverableConsumerTest.java          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/713c7b8e/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
index 45b6f89..d01503b 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.hazelcast;
 
+import java.util.concurrent.TimeUnit;
+
 import com.hazelcast.core.IQueue;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.builder.RouteBuilder;
@@ -24,8 +26,6 @@ import org.junit.After;
 import org.junit.Test;
 import org.mockito.Mock;
 
-import java.util.concurrent.TimeUnit;
-
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.when;
 


[2/3] camel git commit: Move all Hazelcast instance interaction inside try-catch, and sleep 100 ms when exception occurred to avoid spamming log with errors e.g. when Hazelcast instance is unreachable for a period of time.

Posted by da...@apache.org.
Move all Hazelcast instance interaction inside try-catch, and sleep 100 ms when exception occurred to avoid spamming log with errors e.g. when Hazelcast instance is unreachable for a period of time.


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

Branch: refs/heads/master
Commit: 12d5182c5ab93f6e364ad0539ed7e3792bfd02c5
Parents: 1dd8bf3
Author: Ann Katrin Gagnat <an...@gmail.com>
Authored: Thu Jun 15 00:08:53 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jun 17 21:57:14 2017 +0200

----------------------------------------------------------------------
 .../hazelcast/seda/HazelcastSedaConsumer.java   | 26 +++++---
 ...daRecoverableConsumerNewTransactionTest.java | 41 ++++++++++++
 ...castSedaRecoverableConsumerRollbackTest.java | 47 ++++++++++++++
 .../HazelcastSedaRecoverableConsumerTest.java   | 67 ++++++++++++++++++++
 4 files changed, 172 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/12d5182c/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
index 4dd99a1..54bb208 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
@@ -77,16 +77,17 @@ public class HazelcastSedaConsumer extends DefaultConsumer implements Runnable {
             final Exchange exchange = this.getEndpoint().createExchange();
 
             TransactionContext transactionCtx = null;
-            if (endpoint.getConfiguration().isTransacted()) {
-                // Get and begin transaction if exist
-                transactionCtx = endpoint.getHazelcastInstance().newTransactionContext();
+            try {
+                if (endpoint.getConfiguration().isTransacted()) {
+                    // Get and begin transaction if exist
+                    transactionCtx = endpoint.getHazelcastInstance().newTransactionContext();
 
-                if (transactionCtx != null) {
-                    log.trace("Begin transaction: {}", transactionCtx.getTxnId());
-                    transactionCtx.beginTransaction();
+                    if (transactionCtx != null) {
+                        log.trace("Begin transaction: {}", transactionCtx.getTxnId());
+                        transactionCtx.beginTransaction();
+                    }
                 }
-            }
-            try {
+
                 final Object body = queue.poll(endpoint.getConfiguration().getPollTimeout(), TimeUnit.MILLISECONDS);
 
                 if (body != null) {
@@ -134,9 +135,16 @@ public class HazelcastSedaConsumer extends DefaultConsumer implements Runnable {
                 // Rollback
                 if (transactionCtx != null) {
                     log.trace("Rollback transaction: {}", transactionCtx.getTxnId());
-                    transactionCtx.rollbackTransaction();
+                    try {
+                        transactionCtx.rollbackTransaction();
+                    } catch (Throwable ignore) {
+                    }
                 }
                 getExceptionHandler().handleException("Error processing exchange", exchange, e);
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ignore) {
+                }
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/12d5182c/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerNewTransactionTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerNewTransactionTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerNewTransactionTest.java
new file mode 100644
index 0000000..d9f5eec
--- /dev/null
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerNewTransactionTest.java
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hazelcast;
+
+import com.hazelcast.core.HazelcastException;
+import com.hazelcast.core.HazelcastInstance;
+import com.hazelcast.transaction.TransactionContext;
+import org.mockito.Mockito;
+
+import static org.mockito.Mockito.*;
+
+public class HazelcastSedaRecoverableConsumerNewTransactionTest extends HazelcastSedaRecoverableConsumerTest {
+
+    protected void trainHazelcastInstance(HazelcastInstance hazelcastInstance) {
+        TransactionContext transactionContext = Mockito.mock(TransactionContext.class);
+        when(hazelcastInstance.newTransactionContext())
+                .thenThrow(new HazelcastException("Could not obtain Connection!!!"))
+                .thenReturn(transactionContext);
+        when(hazelcastInstance.getQueue("foo")).thenReturn(queue);
+    }
+
+    protected void verifyHazelcastInstance(HazelcastInstance hazelcastInstance) {
+        verify(hazelcastInstance).getQueue("foo");
+        verify(hazelcastInstance, atLeastOnce()).newTransactionContext();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/12d5182c/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerRollbackTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerRollbackTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerRollbackTest.java
new file mode 100644
index 0000000..43d0bcc
--- /dev/null
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerRollbackTest.java
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hazelcast;
+
+import com.hazelcast.core.HazelcastException;
+import com.hazelcast.core.HazelcastInstance;
+import com.hazelcast.transaction.TransactionContext;
+import org.mockito.Mockito;
+
+import static org.mockito.Mockito.*;
+
+
+public class HazelcastSedaRecoverableConsumerRollbackTest extends HazelcastSedaRecoverableConsumerTest {
+
+    protected void trainHazelcastInstance(HazelcastInstance hazelcastInstance) {
+        TransactionContext transactionContext = Mockito.mock(TransactionContext.class);
+        HazelcastException hazelcastException = new HazelcastException("Could not obtain Connection!!!");
+        doThrow(hazelcastException)
+                .doNothing()
+                .when(transactionContext).beginTransaction();
+        doThrow(hazelcastException)
+                .doNothing()
+                .when(transactionContext).rollbackTransaction();
+        when(hazelcastInstance.newTransactionContext()).thenReturn(transactionContext);
+        when(hazelcastInstance.getQueue("foo")).thenReturn(queue);
+    }
+
+    protected void verifyHazelcastInstance(HazelcastInstance hazelcastInstance) {
+        verify(hazelcastInstance).getQueue("foo");
+        verify(hazelcastInstance, atLeastOnce()).newTransactionContext();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/12d5182c/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
new file mode 100644
index 0000000..45b6f89
--- /dev/null
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
@@ -0,0 +1,67 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hazelcast;
+
+import com.hazelcast.core.IQueue;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.After;
+import org.junit.Test;
+import org.mockito.Mock;
+
+import java.util.concurrent.TimeUnit;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.when;
+
+public abstract class HazelcastSedaRecoverableConsumerTest extends HazelcastCamelTestSupport {
+
+    @Mock
+    protected IQueue<Object> queue;
+
+    @EndpointInject(uri = "mock:result")
+    protected MockEndpoint mock;
+
+    @Test
+    public void testRecovery() throws InterruptedException {
+        when(queue.poll(any(Long.class), any(TimeUnit.class)))
+                .thenReturn("bar")
+                .thenReturn(null);
+
+        mock.expectedMessageCount(1);
+
+        assertMockEndpointsSatisfied(5000, TimeUnit.MILLISECONDS);
+    }
+
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("hazelcast-seda:foo?transacted=true").to("mock:result");
+            }
+        };
+    }
+
+    @After
+    public final void stopContext() throws Exception {
+        context.stop();
+    }
+
+}


[3/3] camel git commit: Make option configurable - onErrorDelay

Posted by da...@apache.org.
Make option configurable - onErrorDelay


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

Branch: refs/heads/master
Commit: a7593280b1d5cd672db88f38a6a16accf44de212
Parents: 713c7b8e
Author: Ann Katrin Gagnat <an...@gmail.com>
Authored: Sat Jun 17 20:40:45 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jun 17 21:57:15 2017 +0200

----------------------------------------------------------------------
 .../docs/hazelcast-atomicvalue-component.adoc   |  3 ++-
 .../main/docs/hazelcast-instance-component.adoc |  3 ++-
 .../src/main/docs/hazelcast-list-component.adoc |  3 ++-
 .../src/main/docs/hazelcast-map-component.adoc  |  3 ++-
 .../main/docs/hazelcast-multimap-component.adoc |  3 ++-
 .../main/docs/hazelcast-queue-component.adoc    |  3 ++-
 .../docs/hazelcast-replicatedmap-component.adoc |  3 ++-
 .../docs/hazelcast-ringbuffer-component.adoc    |  3 ++-
 .../src/main/docs/hazelcast-seda-component.adoc |  3 ++-
 .../src/main/docs/hazelcast-set-component.adoc  |  3 ++-
 .../main/docs/hazelcast-topic-component.adoc    |  3 ++-
 .../seda/HazelcastSedaConfiguration.java        | 16 +++++++++++++
 .../hazelcast/seda/HazelcastSedaConsumer.java   |  2 +-
 .../HazelcastSedaConfigurationTest.java         | 24 ++++++++++++++++++++
 .../HazelcastSedaRecoverableConsumerTest.java   |  2 +-
 15 files changed, 64 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-atomicvalue-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-atomicvalue-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-atomicvalue-component.adoc
index 82315ea..741ba48 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-atomicvalue-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-atomicvalue-component.adoc
@@ -39,7 +39,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (9 parameters):
+#### Query Parameters (10 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -50,6 +50,7 @@ with the following path and query parameters:
 | **hazelcastInstanceName** (producer) | The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't specify the instance reference camel use the default hazelcast instance from the camel-hazelcast instance. |  | String
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-instance-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-instance-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-instance-component.adoc
index 255e50e..4845eee 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-instance-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-instance-component.adoc
@@ -38,7 +38,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (12 parameters):
+#### Query Parameters (13 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -52,6 +52,7 @@ with the following path and query parameters:
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-list-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-list-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-list-component.adoc
index e877495..4c7273a 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-list-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-list-component.adoc
@@ -34,7 +34,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (12 parameters):
+#### Query Parameters (13 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -48,6 +48,7 @@ with the following path and query parameters:
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc
index ab01655..10abb19 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc
@@ -35,7 +35,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (12 parameters):
+#### Query Parameters (13 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -49,6 +49,7 @@ with the following path and query parameters:
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-multimap-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-multimap-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-multimap-component.adoc
index f19f4a4..d7da2a3 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-multimap-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-multimap-component.adoc
@@ -36,7 +36,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (12 parameters):
+#### Query Parameters (13 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -50,6 +50,7 @@ with the following path and query parameters:
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc
index 1b2b5f7..9a98a32 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc
@@ -35,7 +35,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (12 parameters):
+#### Query Parameters (13 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -49,6 +49,7 @@ with the following path and query parameters:
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc
index 8a87c28..2dead67 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc
@@ -36,7 +36,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (12 parameters):
+#### Query Parameters (13 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -50,6 +50,7 @@ with the following path and query parameters:
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-ringbuffer-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-ringbuffer-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-ringbuffer-component.adoc
index 1a9001a..a653ff8 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-ringbuffer-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-ringbuffer-component.adoc
@@ -38,7 +38,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (9 parameters):
+#### Query Parameters (10 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -49,6 +49,7 @@ with the following path and query parameters:
 | **hazelcastInstanceName** (producer) | The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't specify the instance reference camel use the default hazelcast instance from the camel-hazelcast instance. |  | String
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-seda-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-seda-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-seda-component.adoc
index 165dc0a4..32be744 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-seda-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-seda-component.adoc
@@ -36,7 +36,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (12 parameters):
+#### Query Parameters (13 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -50,6 +50,7 @@ with the following path and query parameters:
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-set-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-set-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-set-component.adoc
index 529faa5..74209d4 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-set-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-set-component.adoc
@@ -35,7 +35,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (12 parameters):
+#### Query Parameters (13 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -49,6 +49,7 @@ with the following path and query parameters:
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/docs/hazelcast-topic-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-topic-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-topic-component.adoc
index b6e224b..69c9a32 100644
--- a/components/camel-hazelcast/src/main/docs/hazelcast-topic-component.adoc
+++ b/components/camel-hazelcast/src/main/docs/hazelcast-topic-component.adoc
@@ -35,7 +35,7 @@ with the following path and query parameters:
 | **cacheName** | *Required* The name of the cache |  | String
 |=======================================================================
 
-#### Query Parameters (12 parameters):
+#### Query Parameters (13 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -49,6 +49,7 @@ with the following path and query parameters:
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **concurrentConsumers** (seda) | To use concurrent consumers polling from the SEDA queue. | 1 | int
+| **onErrorDelay** (seda) | Milliseconds before consumer continues polling after an error has occurred. | 1000 | int
 | **pollTimeout** (seda) | The timeout used when consuming from the SEDA queue. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown. | 1000 | int
 | **transacted** (seda) | If set to true then the consumer runs in transaction mode where the messages in the seda queue will only be removed if the transaction commits which happens when the processing is complete. | false | boolean
 | **transferExchange** (seda) | If set to true the whole Exchange will be transfered. If header or body contains not serializable objects they will be skipped. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConfiguration.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConfiguration.java
index 2f003de..26df962 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConfiguration.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConfiguration.java
@@ -32,6 +32,8 @@ public class HazelcastSedaConfiguration {
     private int concurrentConsumers = 1;
     @UriParam(label = "seda", defaultValue = "1000")
     private int pollTimeout = 1000;
+    @UriParam(label = "seda", defaultValue = "1000")
+    private int onErrorDelay = 1000;
     @UriParam(label = "seda")
     private boolean transferExchange;
     @UriParam(label = "seda")
@@ -92,6 +94,20 @@ public class HazelcastSedaConfiguration {
     }
 
     /**
+     * Milliseconds before consumer continues polling after an error has occurred.
+     */
+    public void setOnErrorDelay(int onErrorDelay) {
+        if (onErrorDelay < 0) {
+            throw new IllegalArgumentException("Property onErrorDelay must be a positive number, was " + onErrorDelay);
+        }
+        this.onErrorDelay = onErrorDelay;
+    }
+
+    public int getOnErrorDelay() {
+        return onErrorDelay;
+    }
+
+    /**
      * If set to true the whole Exchange will be transfered. If header or body contains not serializable objects, they will be skipped.
      */
     public void setTransferExchange(boolean transferExchange) {

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
index 54bb208..7e3b24c 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java
@@ -142,7 +142,7 @@ public class HazelcastSedaConsumer extends DefaultConsumer implements Runnable {
                 }
                 getExceptionHandler().handleException("Error processing exchange", exchange, e);
                 try {
-                    Thread.sleep(100);
+                    Thread.sleep(endpoint.getConfiguration().getOnErrorDelay());
                 } catch (InterruptedException ignore) {
                 }
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java
index 2cf74c7..7633569 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.hazelcast;
 
+import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.component.hazelcast.seda.HazelcastSedaEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
@@ -42,6 +43,7 @@ public class HazelcastSedaConfigurationTest extends CamelTestSupport {
         assertEquals("Invalid queue name", "foo", hzlqEndpoint.getConfiguration().getQueueName());
         assertEquals("Default value of concurrent consumers is invalid", 1, hzlqEndpoint.getConfiguration().getConcurrentConsumers());
         assertEquals("Default value of pool timeout is invalid", 1000, hzlqEndpoint.getConfiguration().getPollTimeout());
+        assertEquals("Default value of on error delay is invalid", 1000, hzlqEndpoint.getConfiguration().getOnErrorDelay());
     }
 
     @Test
@@ -51,6 +53,7 @@ public class HazelcastSedaConfigurationTest extends CamelTestSupport {
         assertEquals("Invalid queue name", "foo", hzlqEndpoint.getConfiguration().getQueueName());
         assertEquals("Value of concurrent consumers is invalid", 4, hzlqEndpoint.getConfiguration().getConcurrentConsumers());
         assertEquals("Default value of pool timeout is invalid", 1000, hzlqEndpoint.getConfiguration().getPollTimeout());
+        assertEquals("Default value of on error delay is invalid", 1000, hzlqEndpoint.getConfiguration().getOnErrorDelay());
     }
 
     @Test
@@ -60,6 +63,27 @@ public class HazelcastSedaConfigurationTest extends CamelTestSupport {
         assertEquals("Invalid queue name", "foo", hzlqEndpoint.getConfiguration().getQueueName());
         assertEquals("Default value of concurrent consumers is invalid", 1, hzlqEndpoint.getConfiguration().getConcurrentConsumers());
         assertEquals("Invalid pool timeout", 4000, hzlqEndpoint.getConfiguration().getPollTimeout());
+        assertEquals("Default value of on error delay is invalid", 1000, hzlqEndpoint.getConfiguration().getOnErrorDelay());
+    }
+
+    @Test
+    public void createEndpointWithOnErrorDelayParam() throws Exception {
+        HazelcastSedaEndpoint hzlqEndpoint = (HazelcastSedaEndpoint) context.getEndpoint("hazelcast-seda:foo?onErrorDelay=5000");
+
+        assertEquals("Invalid queue name", "foo", hzlqEndpoint.getConfiguration().getQueueName());
+        assertEquals("Default value of concurrent consumers is invalid", 1, hzlqEndpoint.getConfiguration().getConcurrentConsumers());
+        assertEquals("Default value of pool timeout is invalid", 1000, hzlqEndpoint.getConfiguration().getPollTimeout());
+        assertEquals("Value of on error delay is invalid", 5000, hzlqEndpoint.getConfiguration().getOnErrorDelay());
+    }
+
+    @Test
+    public void createEndpointWithIllegalOnErrorDelayParam() throws Exception {
+        try {
+            context.getEndpoint("hazelcast-seda:foo?onErrorDelay=-1");
+            fail("Should have thrown exception");
+        } catch (ResolveEndpointFailedException e) {
+            assertTrue(e.getCause().getMessage().contains("onErrorDelay must be a positive number, was -1"));
+        }
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a7593280/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
index d01503b..ee29f7c 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaRecoverableConsumerTest.java
@@ -54,7 +54,7 @@ public abstract class HazelcastSedaRecoverableConsumerTest extends HazelcastCame
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("hazelcast-seda:foo?transacted=true").to("mock:result");
+                from("hazelcast-seda:foo?transacted=true&onErrorDelay=5").to("mock:result");
             }
         };
     }