You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2021/10/20 09:06:38 UTC

[camel-quarkus] 02/02: ddb - start consumer at the time it is needed

This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit af2d9142efa3e4c5f62c5eed723716dc1e32bc84
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Tue Oct 19 16:34:53 2021 +0200

    ddb - start consumer at the time it is needed
---
 .../camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamRoutes.java       | 1 +
 .../apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamTest.java  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/integration-test-groups/aws2/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamRoutes.java b/integration-test-groups/aws2/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamRoutes.java
index 8d73b81..e401c0f 100644
--- a/integration-test-groups/aws2/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamRoutes.java
+++ b/integration-test-groups/aws2/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamRoutes.java
@@ -46,6 +46,7 @@ public class Aws2DdbStreamRoutes extends RouteBuilder {
         from("aws2-ddbstream://" + streamTableName
                 + "?streamIteratorType=FROM_LATEST")
                         .id("aws2DdbStreamRoute")
+                        .autoStartup(false)
                         .process(e -> {
                             Record record = e.getMessage().getBody(Record.class);
                             StreamRecord item = record.dynamodb();
diff --git a/integration-test-groups/aws2/aws2-ddb/src/test/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamTest.java b/integration-test-groups/aws2/aws2-ddb/src/test/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamTest.java
index 26b3f29..a008400 100644
--- a/integration-test-groups/aws2/aws2-ddb/src/test/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamTest.java
+++ b/integration-test-groups/aws2/aws2-ddb/src/test/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbStreamTest.java
@@ -52,6 +52,9 @@ class Aws2DdbStreamTest {
         final String key3 = "key-3-" + UUID.randomUUID().toString().replace("-", "");
         final String msg3 = "val-3-" + UUID.randomUUID().toString().replace("-", "");
 
+        routeController("start", null);
+        routeController("status", ServiceStatus.Started.name());
+
         waitForStreamConsumerToStart();
 
         /* Put #1 */