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 2021/10/27 07:04:02 UTC
[camel] branch main updated (1c2e278 -> 0d303d8)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 1c2e278 CAMEL-17124 Changed filter expression for query parameters (#6333)
new db64c4a CAMEL-17000: camel-seda - Add component level option to set pollTimeout. Remove JVM system property as its flaky for parallel unit testing.
new 23a81e8 CAMEL-17000: camel-seda - Add component level option to set pollTimeout. Remove JVM system property as its flaky for parallel unit testing.
new 0d303d8 CAMEL-17000: camel-seda - Add component level option to set pollTimeout. Remove JVM system property as its flaky for parallel unit testing.
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../component/seda/SedaComponentConfigurer.java | 6 ++++++
.../org/apache/camel/component/seda/seda.json | 5 +++--
.../apache/camel/component/seda/SedaComponent.java | 17 ++++++++++++++++
.../apache/camel/component/seda/SedaEndpoint.java | 11 +++--------
.../apache/camel/component/rest/RestRefTest.java | 1 -
.../rest/SpringFromRestConfigurationTest.java | 1 -
.../rest/SpringFromRestDuplicateTest.java | 1 -
.../rest/SpringFromRestGetEmbeddedRouteTest.java | 1 -
.../rest/SpringFromRestGetInterceptTest.java | 1 -
.../rest/SpringFromRestGetOnExceptionTest.java | 1 -
.../SpringFromRestGetRouteOnExceptionTest.java | 1 -
.../component/rest/SpringFromRestGetTest.java | 1 -
.../rest/SpringFromRestIdAndDescriptionTest.java | 1 -
.../rest/SpringFromRestUriPrefixTest.java | 1 -
.../camel/spring/SpringEndpointPropertyTest.java | 2 --
.../org/apache/camel/spring/SpringTestSupport.java | 5 +++--
.../component/dsl/SedaComponentBuilderFactory.java | 19 ++++++++++++++++++
.../java/org/apache/camel/ContextTestSupport.java | 8 ++++----
.../test/java/org/apache/camel/TestSupport.java | 5 +++++
.../org/apache/camel/builder/ErrorHandlerTest.java | 15 --------------
.../ComponentResolvePropertyPlaceholdersTest.java | 2 ++
.../camel/component/seda/SedaEndpointTest.java | 1 +
.../apache/camel/component/seda/SedaRouteTest.java | 23 ++++++----------------
.../endpoint/dsl/SedaEndpointBuilderFactory.java | 18 +++++++++--------
.../management/ManagedCustomComponentNameTest.java | 2 +-
.../management/ManagedUnregisterComponentTest.java | 2 +-
26 files changed, 81 insertions(+), 70 deletions(-)
[camel] 02/03: CAMEL-17000: camel-seda - Add component level option
to set pollTimeout. Remove JVM system property as its flaky for parallel
unit testing.
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 23a81e83d0f476da0e48e9df485332b6f4209f50
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Oct 27 08:58:02 2021 +0200
CAMEL-17000: camel-seda - Add component level option to set pollTimeout. Remove JVM system property as its flaky for parallel unit testing.
---
.../java/org/apache/camel/ContextTestSupport.java | 8 ++++----
.../test/java/org/apache/camel/TestSupport.java | 5 +++++
.../org/apache/camel/builder/ErrorHandlerTest.java | 15 --------------
.../ComponentResolvePropertyPlaceholdersTest.java | 2 ++
.../camel/component/seda/SedaEndpointTest.java | 1 +
.../apache/camel/component/seda/SedaRouteTest.java | 23 ++++++----------------
.../management/ManagedCustomComponentNameTest.java | 2 +-
.../management/ManagedUnregisterComponentTest.java | 2 +-
8 files changed, 20 insertions(+), 38 deletions(-)
diff --git a/core/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java b/core/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
index 5b0817c..fb7bcc3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
+++ b/core/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
@@ -25,6 +25,7 @@ import javax.naming.Context;
import org.apache.camel.builder.NotifyBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.seda.SedaComponent;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.impl.lw.LightweightCamelContext;
import org.apache.camel.model.ModelCamelContext;
@@ -97,9 +98,6 @@ public abstract class ContextTestSupport extends TestSupport {
public void setUp() throws Exception {
super.setUp();
- // make SEDA testing faster
- System.setProperty("CamelSedaPollTimeout", "10");
-
CamelContext c2 = createCamelContext();
if (c2 instanceof ModelCamelContext) {
context = (ModelCamelContext) c2;
@@ -110,6 +108,9 @@ public abstract class ContextTestSupport extends TestSupport {
context.build();
+ // make SEDA run faster
+ context.getComponent("seda", SedaComponent.class).setDefaultPollTimeout(10);
+
template = context.createProducerTemplate();
consumer = context.createConsumerTemplate();
@@ -158,7 +159,6 @@ public abstract class ContextTestSupport extends TestSupport {
template.stop();
}
stopCamelContext();
- System.clearProperty("CamelSedaPollTimeout");
super.tearDown();
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/TestSupport.java b/core/camel-core/src/test/java/org/apache/camel/TestSupport.java
index ed04871..1c02a87 100644
--- a/core/camel-core/src/test/java/org/apache/camel/TestSupport.java
+++ b/core/camel-core/src/test/java/org/apache/camel/TestSupport.java
@@ -29,6 +29,7 @@ import java.util.Locale;
import org.apache.camel.builder.Builder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.builder.ValueBuilder;
+import org.apache.camel.component.seda.SedaComponent;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.processor.Pipeline;
import org.apache.camel.processor.errorhandler.ErrorHandlerSupport;
@@ -416,6 +417,10 @@ public abstract class TestSupport {
*/
public static List<Route> getRouteList(RouteBuilder builder) throws Exception {
CamelContext context = new DefaultCamelContext();
+
+ // make SEDA run faster
+ context.getComponent("seda", SedaComponent.class).setDefaultPollTimeout(10);
+
context.addRoutes(builder);
context.start();
List<Route> answer = context.getRoutes();
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java
index aa4b184..e6d91b9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java
@@ -28,27 +28,12 @@ import org.apache.camel.processor.FilterProcessor;
import org.apache.camel.processor.SendProcessor;
import org.apache.camel.processor.errorhandler.DeadLetterChannel;
import org.apache.camel.processor.errorhandler.RedeliveryPolicy;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class ErrorHandlerTest extends TestSupport {
- @Override
- @BeforeEach
- public void setUp() throws Exception {
- // make SEDA testing faster
- System.setProperty("CamelSedaPollTimeout", "10");
- }
-
- @Override
- @AfterEach
- public void tearDown() throws Exception {
- System.clearProperty("CamelSedaPollTimeout");
- }
-
@Test
public void testOverloadingTheDefaultErrorHandler() throws Exception {
// START SNIPPET: e1
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/properties/ComponentResolvePropertyPlaceholdersTest.java b/core/camel-core/src/test/java/org/apache/camel/component/properties/ComponentResolvePropertyPlaceholdersTest.java
index 4f4148b..6afb9db 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/properties/ComponentResolvePropertyPlaceholdersTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/properties/ComponentResolvePropertyPlaceholdersTest.java
@@ -38,7 +38,9 @@ public class ComponentResolvePropertyPlaceholdersTest extends ContextTestSupport
@Override
public void configure() throws Exception {
SedaComponent seda = new SedaComponent();
+ seda.setDefaultPollTimeout(10);
seda.setQueueSize(propertyInject("myQueueSize", int.class));
+ context.removeComponent("seda");
context.addComponent("seda", seda);
from("seda:start").to("mock:{{cool.result}}");
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaEndpointTest.java b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaEndpointTest.java
index df26aa3..cf1f41d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaEndpointTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaEndpointTest.java
@@ -154,6 +154,7 @@ public class SedaEndpointTest extends ContextTestSupport {
SedaComponent sedaComponent = new SedaComponent();
sedaComponent.setQueueSize(300);
sedaComponent.setConcurrentConsumers(3);
+ context.removeComponent("seda");
context.addComponent("seda", sedaComponent);
SedaEndpoint seda = context.getEndpoint("seda://foo", SedaEndpoint.class);
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
index fae1148..75ba2fb 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
@@ -27,35 +27,21 @@ import org.apache.camel.Producer;
import org.apache.camel.TestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class SedaRouteTest extends TestSupport {
- @Override
- @BeforeEach
- public void setUp() throws Exception {
- // make SEDA testing faster
- System.setProperty("CamelSedaPollTimeout", "10");
- super.setUp();
- }
-
- @Override
- @AfterEach
- public void tearDown() throws Exception {
- System.clearProperty("CamelSedaPollTimeout");
- super.tearDown();
- }
-
@Test
public void testSedaQueue() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
CamelContext context = new DefaultCamelContext();
+ // make SEDA run faster
+ context.getComponent("seda", SedaComponent.class).setDefaultPollTimeout(10);
+
// lets add some routes
context.addRoutes(new RouteBuilder() {
public void configure() {
@@ -91,6 +77,9 @@ public class SedaRouteTest extends TestSupport {
CamelContext context = new DefaultCamelContext();
+ // make SEDA run faster
+ context.getComponent("seda", SedaComponent.class).setDefaultPollTimeout(10);
+
// lets add some routes
context.addRoutes(new RouteBuilder() {
public void configure() {
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagedCustomComponentNameTest.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagedCustomComponentNameTest.java
index 4628b28..71d0a2e 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagedCustomComponentNameTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagedCustomComponentNameTest.java
@@ -40,7 +40,7 @@ public class ManagedCustomComponentNameTest extends ManagementTestSupport {
MBeanServer mbeanServer = getMBeanServer();
Set<ObjectName> set = mbeanServer.queryNames(new ObjectName("*:type=components,*"), null);
- assertEquals(3, set.size());
+ assertEquals(3 + 1, set.size()); // + 1 since seda is automatic added in ContextTestSupport
ObjectName on = set.iterator().next();
assertTrue(mbeanServer.isRegistered(on), "Should be registered");
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagedUnregisterComponentTest.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagedUnregisterComponentTest.java
index bd4e743..257016f 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagedUnregisterComponentTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagedUnregisterComponentTest.java
@@ -39,7 +39,7 @@ public class ManagedUnregisterComponentTest extends ManagementTestSupport {
MBeanServer mbeanServer = getMBeanServer();
Set<ObjectName> set = mbeanServer.queryNames(new ObjectName("*:type=components,*"), null);
- assertEquals(2, set.size());
+ assertEquals(2 + 1, set.size()); // + 1 since seda is automatic added in ContextTestSupport
ObjectName on = set.iterator().next();
assertTrue(mbeanServer.isRegistered(on), "Should be registered");
[camel] 01/03: CAMEL-17000: camel-seda - Add component level option
to set pollTimeout. Remove JVM system property as its flaky for parallel
unit testing.
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit db64c4a05788d32d6a501139927cb74607f97123
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Oct 27 07:56:19 2021 +0200
CAMEL-17000: camel-seda - Add component level option to set pollTimeout. Remove JVM system property as its flaky for parallel unit testing.
---
.../camel/component/seda/SedaComponentConfigurer.java | 6 ++++++
.../org/apache/camel/component/seda/seda.json | 5 +++--
.../apache/camel/component/seda/SedaComponent.java | 17 +++++++++++++++++
.../org/apache/camel/component/seda/SedaEndpoint.java | 11 +++--------
.../component/dsl/SedaComponentBuilderFactory.java | 19 +++++++++++++++++++
.../endpoint/dsl/SedaEndpointBuilderFactory.java | 18 ++++++++++--------
6 files changed, 58 insertions(+), 18 deletions(-)
diff --git a/components/camel-seda/src/generated/java/org/apache/camel/component/seda/SedaComponentConfigurer.java b/components/camel-seda/src/generated/java/org/apache/camel/component/seda/SedaComponentConfigurer.java
index d0c602a..29b0c76 100644
--- a/components/camel-seda/src/generated/java/org/apache/camel/component/seda/SedaComponentConfigurer.java
+++ b/components/camel-seda/src/generated/java/org/apache/camel/component/seda/SedaComponentConfigurer.java
@@ -33,6 +33,8 @@ public class SedaComponentConfigurer extends PropertyConfigurerSupport implement
case "defaultDiscardWhenFull": target.setDefaultDiscardWhenFull(property(camelContext, boolean.class, value)); return true;
case "defaultoffertimeout":
case "defaultOfferTimeout": target.setDefaultOfferTimeout(property(camelContext, long.class, value)); return true;
+ case "defaultpolltimeout":
+ case "defaultPollTimeout": target.setDefaultPollTimeout(property(camelContext, int.class, value)); return true;
case "defaultqueuefactory":
case "defaultQueueFactory": target.setDefaultQueueFactory(property(camelContext, org.apache.camel.component.seda.BlockingQueueFactory.class, value)); return true;
case "lazystartproducer":
@@ -58,6 +60,8 @@ public class SedaComponentConfigurer extends PropertyConfigurerSupport implement
case "defaultDiscardWhenFull": return boolean.class;
case "defaultoffertimeout":
case "defaultOfferTimeout": return long.class;
+ case "defaultpolltimeout":
+ case "defaultPollTimeout": return int.class;
case "defaultqueuefactory":
case "defaultQueueFactory": return org.apache.camel.component.seda.BlockingQueueFactory.class;
case "lazystartproducer":
@@ -84,6 +88,8 @@ public class SedaComponentConfigurer extends PropertyConfigurerSupport implement
case "defaultDiscardWhenFull": return target.isDefaultDiscardWhenFull();
case "defaultoffertimeout":
case "defaultOfferTimeout": return target.getDefaultOfferTimeout();
+ case "defaultpolltimeout":
+ case "defaultPollTimeout": return target.getDefaultPollTimeout();
case "defaultqueuefactory":
case "defaultQueueFactory": return target.getDefaultQueueFactory();
case "lazystartproducer":
diff --git a/components/camel-seda/src/generated/resources/org/apache/camel/component/seda/seda.json b/components/camel-seda/src/generated/resources/org/apache/camel/component/seda/seda.json
index 6d997b6..dbcd6a6 100644
--- a/components/camel-seda/src/generated/resources/org/apache/camel/component/seda/seda.json
+++ b/components/camel-seda/src/generated/resources/org/apache/camel/component/seda/seda.json
@@ -24,6 +24,7 @@
"componentProperties": {
"bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 me [...]
"concurrentConsumers": { "kind": "property", "displayName": "Concurrent Consumers", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "description": "Sets the default number of concurrent threads processing exchanges." },
+ "defaultPollTimeout": { "kind": "property", "displayName": "Default Poll Timeout", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000, "description": "The timeout (in milliseconds) used when polling. When a timeout occurs, the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react m [...]
"defaultBlockWhenFull": { "kind": "property", "displayName": "Default Block When Full", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity is no longer exhausted. By default, an exception will be thrown stating that the queue is full. By enabl [...]
"defaultDiscardWhenFull": { "kind": "property", "displayName": "Default Discard When Full", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether a thread that sends messages to a full SEDA queue will be discarded. By default, an exception will be thrown stating that the queue is full. By enabling this option, the calling thread wil [...]
"defaultOfferTimeout": { "kind": "property", "displayName": "Default Offer Timeout", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity is no longer exhausted. By default, an exception will be thrown stating that the queue is full. By enabling this option, where a conf [...]
@@ -41,14 +42,14 @@
"exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
"limitConcurrentConsumers": { "kind": "parameter", "displayName": "Limit Concurrent Consumers", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to limit the number of concurrentConsumers to the maximum of 500. By default, an exception will be thrown if an endpoint is configured with a greater number. You can [...]
"multipleConsumers": { "kind": "parameter", "displayName": "Multiple Consumers", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Specifies whether multiple consumers are allowed. If enabled, you can use SEDA for Publish-Subscribe messaging. That is, you can send a message to the SEDA queue and have each consumer re [...]
- "pollTimeout": { "kind": "parameter", "displayName": "Poll Timeout", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000, "description": "The timeout used when polling. 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." },
+ "pollTimeout": { "kind": "parameter", "displayName": "Poll Timeout", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000, "description": "The timeout (in milliseconds) used when polling. 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 up [...]
"purgeWhenStopping": { "kind": "parameter", "displayName": "Purge When Stopping", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to purge the task queue when stopping the consumer\/route. This allows to stop faster, as any pending messages on the queue is discarded." },
"blockWhenFull": { "kind": "parameter", "displayName": "Block When Full", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity is no longer exhausted. By default, an exception will be thrown stating that the queue is full. By enabling this optio [...]
"discardIfNoConsumers": { "kind": "parameter", "displayName": "Discard If No Consumers", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should discard the message (do not add the message to the queue), when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsu [...]
"discardWhenFull": { "kind": "parameter", "displayName": "Discard When Full", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether a thread that sends messages to a full SEDA queue will be discarded. By default, an exception will be thrown stating that the queue is full. By enabling this option, the calling thread will give up send [...]
"failIfNoConsumers": { "kind": "parameter", "displayName": "Fail If No Consumers", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should fail by throwing an exception, when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be enabled at the same time." },
"lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during sta [...]
- "offerTimeout": { "kind": "parameter", "displayName": "Offer Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "offerTimeout (in milliseconds) can be added to the block case when queue is full. You can disable timeout by using 0 or a negative value." },
+ "offerTimeout": { "kind": "parameter", "displayName": "Offer Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "Offer timeout (in milliseconds) can be added to the block case when queue is full. You can disable timeout by using 0 or a negative value." },
"timeout": { "kind": "parameter", "displayName": "Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "description": "Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value." },
"waitForTaskToComplete": { "kind": "parameter", "displayName": "Wait For Task To Complete", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.WaitForTaskToComplete", "enum": [ "Never", "IfReplyExpected", "Always" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "IfReplyExpected", "description": "Option to specify whether the caller should wait for the async task to complete or not before continuing [...]
"queue": { "kind": "parameter", "displayName": "Queue", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.BlockingQueue", "deprecated": false, "autowired": false, "secret": false, "description": "Define the queue instance which will be used by the endpoint" }
diff --git a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaComponent.java b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaComponent.java
index 78b7679..13c1963 100644
--- a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaComponent.java
+++ b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaComponent.java
@@ -49,6 +49,8 @@ public class SedaComponent extends DefaultComponent {
private boolean defaultDiscardWhenFull;
@Metadata(label = "producer")
private long defaultOfferTimeout;
+ @Metadata(label = "consumer,advanced", defaultValue = "1000")
+ private int defaultPollTimeout = 1000;
private final Map<String, QueueReference> queues = new HashMap<>();
private final Map<String, Integer> customSize = new HashMap<>();
@@ -129,6 +131,18 @@ public class SedaComponent extends DefaultComponent {
this.defaultOfferTimeout = defaultOfferTimeout;
}
+ public int getDefaultPollTimeout() {
+ return defaultPollTimeout;
+ }
+
+ /**
+ * The timeout (in milliseconds) used when polling. 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.
+ */
+ public void setDefaultPollTimeout(int defaultPollTimeout) {
+ this.defaultPollTimeout = defaultPollTimeout;
+ }
+
public synchronized QueueReference getOrCreateQueue(
SedaEndpoint endpoint, Integer size, Boolean multipleConsumers, BlockingQueueFactory<Exchange> customQueueFactory) {
@@ -234,6 +248,8 @@ public class SedaComponent extends DefaultComponent {
boolean discardWhenFull = getAndRemoveParameter(parameters, "discardWhenFull", Boolean.class, defaultDiscardWhenFull);
// if offerTimeout is set on endpoint, defaultOfferTimeout is ignored.
long offerTimeout = getAndRemoveParameter(parameters, "offerTimeout", long.class, defaultOfferTimeout);
+ // if offerTimeout is set on endpoint, defaultOfferTimeout is ignored.
+ int pollTimeout = getAndRemoveParameter(parameters, "pollTimeout", int.class, defaultPollTimeout);
// using custom size?
Integer size = getAndRemoveParameter(parameters, "size", Integer.class);
@@ -251,6 +267,7 @@ public class SedaComponent extends DefaultComponent {
answer.setDiscardWhenFull(discardWhenFull);
answer.setConcurrentConsumers(consumers);
answer.setLimitConcurrentConsumers(limitConcurrentConsumers);
+ answer.setPollTimeout(pollTimeout);
setProperties(answer, parameters);
return answer;
}
diff --git a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
index 01b39ef..287e5f2 100644
--- a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
+++ b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
@@ -375,7 +375,7 @@ public class SedaEndpoint extends DefaultEndpoint implements AsyncEndpoint, Brow
}
/**
- * offerTimeout (in milliseconds) can be added to the block case when queue is full. You can disable timeout by
+ * Offer timeout (in milliseconds) can be added to the block case when queue is full. You can disable timeout by
* using 0 or a negative value.
*/
public void setOfferTimeout(long offerTimeout) {
@@ -433,8 +433,8 @@ public class SedaEndpoint extends DefaultEndpoint implements AsyncEndpoint, Brow
}
/**
- * The timeout used when polling. 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.
+ * The timeout (in milliseconds) used when polling. 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.
*/
public void setPollTimeout(int pollTimeout) {
this.pollTimeout = pollTimeout;
@@ -525,11 +525,6 @@ public class SedaEndpoint extends DefaultEndpoint implements AsyncEndpoint, Brow
"Cannot enable both discardWhenFull=true and blockWhenFull=true."
+ " You can only either discard or block when full.");
}
-
- // special for unit testing where we can set a system property to make seda poll faster
- // and therefore also react faster upon shutdown, which makes overall testing faster of the Camel project
- String override = System.getProperty("CamelSedaPollTimeout", "" + getPollTimeout());
- setPollTimeout(Integer.parseInt(override));
}
@Override
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SedaComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SedaComponentBuilderFactory.java
index 192f93e..2cf10b6 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SedaComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SedaComponentBuilderFactory.java
@@ -87,6 +87,24 @@ public interface SedaComponentBuilderFactory {
return this;
}
/**
+ * The timeout (in milliseconds) used when polling. 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.
+ *
+ * The option is a: <code>int</code> type.
+ *
+ * Default: 1000
+ * Group: consumer (advanced)
+ *
+ * @param defaultPollTimeout the value to set
+ * @return the dsl builder
+ */
+ default SedaComponentBuilder defaultPollTimeout(int defaultPollTimeout) {
+ doSetProperty("defaultPollTimeout", defaultPollTimeout);
+ return this;
+ }
+ /**
* Whether a thread that sends messages to a full SEDA queue will block
* until the queue's capacity is no longer exhausted. By default, an
* exception will be thrown stating that the queue is full. By enabling
@@ -240,6 +258,7 @@ public interface SedaComponentBuilderFactory {
switch (name) {
case "bridgeErrorHandler": ((SedaComponent) component).setBridgeErrorHandler((boolean) value); return true;
case "concurrentConsumers": ((SedaComponent) component).setConcurrentConsumers((int) value); return true;
+ case "defaultPollTimeout": ((SedaComponent) component).setDefaultPollTimeout((int) value); return true;
case "defaultBlockWhenFull": ((SedaComponent) component).setDefaultBlockWhenFull((boolean) value); return true;
case "defaultDiscardWhenFull": ((SedaComponent) component).setDefaultDiscardWhenFull((boolean) value); return true;
case "defaultOfferTimeout": ((SedaComponent) component).setDefaultOfferTimeout((long) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SedaEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SedaEndpointBuilderFactory.java
index f6be5d6..07230d3 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SedaEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SedaEndpointBuilderFactory.java
@@ -316,9 +316,10 @@ public interface SedaEndpointBuilderFactory {
return this;
}
/**
- * The timeout used when polling. 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.
+ * The timeout (in milliseconds) used when polling. 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.
*
* The option is a: <code>int</code> type.
*
@@ -333,9 +334,10 @@ public interface SedaEndpointBuilderFactory {
return this;
}
/**
- * The timeout used when polling. 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.
+ * The timeout (in milliseconds) used when polling. 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.
*
* The option will be converted to a <code>int</code> type.
*
@@ -670,7 +672,7 @@ public interface SedaEndpointBuilderFactory {
return this;
}
/**
- * offerTimeout (in milliseconds) can be added to the block case when
+ * Offer timeout (in milliseconds) can be added to the block case when
* queue is full. You can disable timeout by using 0 or a negative
* value.
*
@@ -686,7 +688,7 @@ public interface SedaEndpointBuilderFactory {
return this;
}
/**
- * offerTimeout (in milliseconds) can be added to the block case when
+ * Offer timeout (in milliseconds) can be added to the block case when
* queue is full. You can disable timeout by using 0 or a negative
* value.
*
[camel] 03/03: CAMEL-17000: camel-seda - Add component level option
to set pollTimeout. Remove JVM system property as its flaky for parallel
unit testing.
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 0d303d8619c565714586cd97e122be5c04bbfc5e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Oct 27 09:03:16 2021 +0200
CAMEL-17000: camel-seda - Add component level option to set pollTimeout. Remove JVM system property as its flaky for parallel unit testing.
---
.../src/test/java/org/apache/camel/component/rest/RestRefTest.java | 1 -
.../apache/camel/component/rest/SpringFromRestConfigurationTest.java | 1 -
.../org/apache/camel/component/rest/SpringFromRestDuplicateTest.java | 1 -
.../camel/component/rest/SpringFromRestGetEmbeddedRouteTest.java | 1 -
.../apache/camel/component/rest/SpringFromRestGetInterceptTest.java | 1 -
.../camel/component/rest/SpringFromRestGetOnExceptionTest.java | 1 -
.../camel/component/rest/SpringFromRestGetRouteOnExceptionTest.java | 1 -
.../java/org/apache/camel/component/rest/SpringFromRestGetTest.java | 1 -
.../camel/component/rest/SpringFromRestIdAndDescriptionTest.java | 1 -
.../org/apache/camel/component/rest/SpringFromRestUriPrefixTest.java | 1 -
.../java/org/apache/camel/spring/SpringEndpointPropertyTest.java | 2 --
.../src/test/java/org/apache/camel/spring/SpringTestSupport.java | 5 +++--
12 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/RestRefTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/RestRefTest.java
index de6116fe..f900b1b 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/RestRefTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/RestRefTest.java
@@ -61,7 +61,6 @@ public class RestRefTest extends SpringTestSupport {
@Override
protected AbstractXmlApplicationContext createApplicationContext() {
- System.setProperty("CamelSedaPollTimeout", "10");
return new ClassPathXmlApplicationContext("org/apache/camel/component/rest/RestRefTest.xml");
}
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestConfigurationTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestConfigurationTest.java
index a3ae86b..404e68b 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestConfigurationTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestConfigurationTest.java
@@ -24,7 +24,6 @@ public class SpringFromRestConfigurationTest extends FromRestConfigurationTest {
@Override
protected CamelContext createCamelContext() throws Exception {
- System.setProperty("CamelSedaPollTimeout", "10");
return createSpringCamelContext(this, "org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml");
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestDuplicateTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestDuplicateTest.java
index fd6b1b0..d2846da 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestDuplicateTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestDuplicateTest.java
@@ -30,7 +30,6 @@ public class SpringFromRestDuplicateTest extends SpringTestSupport {
@Override
protected AbstractXmlApplicationContext createApplicationContext() {
- System.setProperty("CamelSedaPollTimeout", "10");
try {
new ClassPathXmlApplicationContext("org/apache/camel/component/rest/SpringFromRestDuplicateTest.xml");
fail("Should throw exception");
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetEmbeddedRouteTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetEmbeddedRouteTest.java
index 621e855..4459c92 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetEmbeddedRouteTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetEmbeddedRouteTest.java
@@ -24,7 +24,6 @@ public class SpringFromRestGetEmbeddedRouteTest extends FromRestGetEmbeddedRoute
@Override
protected CamelContext createCamelContext() throws Exception {
- System.setProperty("CamelSedaPollTimeout", "10");
return createSpringCamelContext(this, "org/apache/camel/component/rest/SpringFromRestGetEmbeddedRouteTest.xml");
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetInterceptTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetInterceptTest.java
index fe17a18..06a9ba3 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetInterceptTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetInterceptTest.java
@@ -24,7 +24,6 @@ public class SpringFromRestGetInterceptTest extends FromRestGetInterceptTest {
@Override
protected CamelContext createCamelContext() throws Exception {
- System.setProperty("CamelSedaPollTimeout", "10");
return createSpringCamelContext(this, "org/apache/camel/component/rest/SpringFromRestGetInterceptTest.xml");
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetOnExceptionTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetOnExceptionTest.java
index 798f259..1b47302 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetOnExceptionTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetOnExceptionTest.java
@@ -24,7 +24,6 @@ public class SpringFromRestGetOnExceptionTest extends FromRestGetOnExceptionTest
@Override
protected CamelContext createCamelContext() throws Exception {
- System.setProperty("CamelSedaPollTimeout", "10");
return createSpringCamelContext(this, "org/apache/camel/component/rest/SpringFromRestGetOnExceptionTest.xml");
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetRouteOnExceptionTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetRouteOnExceptionTest.java
index 39d1a95..0c45ada 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetRouteOnExceptionTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetRouteOnExceptionTest.java
@@ -24,7 +24,6 @@ public class SpringFromRestGetRouteOnExceptionTest extends FromRestGetRouteOnExc
@Override
protected CamelContext createCamelContext() throws Exception {
- System.setProperty("CamelSedaPollTimeout", "10");
return createSpringCamelContext(this, "org/apache/camel/component/rest/SpringFromRestGetRouteOnExceptionTest.xml");
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetTest.java
index 25872be..c846606 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestGetTest.java
@@ -24,7 +24,6 @@ public class SpringFromRestGetTest extends FromRestGetTest {
@Override
protected CamelContext createCamelContext() throws Exception {
- System.setProperty("CamelSedaPollTimeout", "10");
return createSpringCamelContext(this, "org/apache/camel/component/rest/SpringFromRestGetTest.xml");
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.java
index effe334..da1b442 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.java
@@ -24,7 +24,6 @@ public class SpringFromRestIdAndDescriptionTest extends FromRestIdAndDescription
@Override
protected CamelContext createCamelContext() throws Exception {
- System.setProperty("CamelSedaPollTimeout", "10");
return createSpringCamelContext(this, "org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml");
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestUriPrefixTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestUriPrefixTest.java
index 03cda9c..fa9b87a 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestUriPrefixTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/component/rest/SpringFromRestUriPrefixTest.java
@@ -24,7 +24,6 @@ public class SpringFromRestUriPrefixTest extends FromRestUriPrefixTest {
@Override
protected CamelContext createCamelContext() throws Exception {
- System.setProperty("CamelSedaPollTimeout", "10");
return createSpringCamelContext(this, "org/apache/camel/component/rest/SpringFromRestUriPrefixTest.xml");
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringEndpointPropertyTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringEndpointPropertyTest.java
index eae90b3..4d75c75 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringEndpointPropertyTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringEndpointPropertyTest.java
@@ -28,8 +28,6 @@ public class SpringEndpointPropertyTest extends SpringTestSupport {
@Override
protected AbstractXmlApplicationContext createApplicationContext() {
- System.clearProperty("CamelSedaPollTimeout");
-
return new ClassPathXmlApplicationContext("org/apache/camel/spring/SpringEndpointPropertyTest.xml");
}
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringTestSupport.java b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringTestSupport.java
index 03829e6..b6a55c3 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringTestSupport.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringTestSupport.java
@@ -28,6 +28,7 @@ import javax.management.ObjectName;
import org.apache.camel.CamelContext;
import org.apache.camel.ContextTestSupport;
+import org.apache.camel.component.seda.SedaComponent;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.impl.engine.DefaultPackageScanClassResolver;
import org.apache.camel.impl.scan.AssignableToPackageScanFilter;
@@ -63,8 +64,6 @@ public abstract class SpringTestSupport extends ContextTestSupport {
public void setUp() throws Exception {
deleteTestDirectory();
- // we want SpringTestSupport to startup faster and not use JMX by default and should stop seda quicker
- System.setProperty("CamelSedaPollTimeout", "10");
DefaultCamelContext.setDisableJmx(!useJmx());
Class<?>[] excluded = excludeRoutes();
if (excluded != null && excluded.length > 0) {
@@ -164,6 +163,8 @@ public abstract class SpringTestSupport extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
CamelContext context = SpringCamelContext.springCamelContext(applicationContext, true);
+ // make SEDA run faster
+ context.getComponent("seda", SedaComponent.class).setDefaultPollTimeout(10);
return context;
}