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 2024/10/30 10:10:18 UTC
(camel-examples) branch main updated (7529bafc -> f80a548b)
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-examples.git
from 7529bafc Fix example
new cacf3504 Remove example that is not for the future
new f80a548b Added missing category
The 2 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:
README.adoc | 16 ++--
pom.xml | 1 -
reactive-executor-vertx/README.adoc | 35 -------
reactive-executor-vertx/pom.xml | 106 ---------------------
.../org/apache/camel/example/MyApplication.java | 61 ------------
.../org/apache/camel/example/MyRouteBuilder.java | 31 ------
.../src/main/resources/application.properties | 27 ------
.../src/main/resources/log4j2.properties | 23 -----
.../java/org/apache/camel/example/VertxTest.java | 61 ------------
resume-api/resume-api-aws2-kinesis/pom.xml | 1 +
resume-api/resume-api-cassandraql/pom.xml | 1 +
resume-api/resume-api-file-offset/pom.xml | 1 +
resume-api/resume-api-fileset-clusterized/pom.xml | 1 +
resume-api/resume-api-fileset-wal/pom.xml | 2 +-
resume-api/resume-api-fileset/pom.xml | 1 +
15 files changed, 13 insertions(+), 355 deletions(-)
delete mode 100644 reactive-executor-vertx/README.adoc
delete mode 100644 reactive-executor-vertx/pom.xml
delete mode 100644 reactive-executor-vertx/src/main/java/org/apache/camel/example/MyApplication.java
delete mode 100644 reactive-executor-vertx/src/main/java/org/apache/camel/example/MyRouteBuilder.java
delete mode 100644 reactive-executor-vertx/src/main/resources/application.properties
delete mode 100644 reactive-executor-vertx/src/main/resources/log4j2.properties
delete mode 100644 reactive-executor-vertx/src/test/java/org/apache/camel/example/VertxTest.java
(camel-examples) 02/02: Added missing category
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-examples.git
commit f80a548b4fb6e060fa35d4f94bda51b94b6b0163
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Oct 30 11:10:09 2024 +0100
Added missing category
---
README.adoc | 16 +++++++---------
resume-api/resume-api-aws2-kinesis/pom.xml | 1 +
resume-api/resume-api-cassandraql/pom.xml | 1 +
resume-api/resume-api-file-offset/pom.xml | 1 +
resume-api/resume-api-fileset-clusterized/pom.xml | 1 +
resume-api/resume-api-fileset-wal/pom.xml | 2 +-
resume-api/resume-api-fileset/pom.xml | 1 +
7 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/README.adoc b/README.adoc
index 9ecf9f39..b5bba362 100644
--- a/README.adoc
+++ b/README.adoc
@@ -28,23 +28,23 @@ readme's instructions.
== Examples
// examples: START
-Number of Examples: 77 (0 deprecated)
+Number of Examples: 74 (0 deprecated)
[width="100%",cols="4,2,4",options="header"]
|===
| Example | Category | Description
-| link:resume-api/resume-api-aws2-kinesis/README.md[Resume Api Aws2 Kinesis] (resume-api-aws2-kinesis) | | An example for showing the Resume API for consuming AWS Kinesis data streams.
+| link:resume-api/resume-api-aws2-kinesis/README.md[Resume Api Aws2 Kinesis] (resume-api-aws2-kinesis) | Advanced | An example for showing the Resume API for consuming AWS Kinesis data streams.
-| link:resume-api/resume-api-cassandraql/README.md[Resume Api Cassandraql] (resume-api-cassandraql) | | An example for showing the Resume API for consuming data from Apache Cassandra.
+| link:resume-api/resume-api-cassandraql/README.md[Resume Api Cassandraql] (resume-api-cassandraql) | Advanced | An example for showing the Resume API for consuming data from Apache Cassandra.
-| link:resume-api/resume-api-file-offset/README.md[Resume Api File Offset] (resume-api-file-offset) | | An example for showing the Resume API for processing a large file.
+| link:resume-api/resume-api-file-offset/README.md[Resume Api File Offset] (resume-api-file-offset) | Advanced | An example for showing the Resume API for processing a large file.
-| link:resume-api/resume-api-fileset/README.md[Resume Api Fileset] (resume-api-fileset) | | An example for showing the Resume API for processing a large directory.
+| link:resume-api/resume-api-fileset/README.md[Resume Api Fileset] (resume-api-fileset) | Advanced | An example for showing the Resume API for processing a large directory.
-| link:resume-api/resume-api-fileset-clusterized/README.md[Resume Api Fileset Clusterized] (resume-api-fileset-clusterized) | | An example for showing the Resume API for processing a large directory in clusterized mode.
+| link:resume-api/resume-api-fileset-clusterized/README.md[Resume Api Fileset Clusterized] (resume-api-fileset-clusterized) | Advanced | An example for showing the Resume API for processing a large directory in clusterized mode.
-| link:resume-api/resume-api-fileset-wal/README.md[Resume Api Fileset Wal] (resume-api-fileset-wal) | | An example for showing the Resume API for processing a large directory using the write ahead log.
+| link:resume-api/resume-api-fileset-wal/README.md[Resume Api Fileset Wal] (resume-api-fileset-wal) | Advanced | An example for showing the Resume API for processing a large directory using the write ahead log.
| link:as2/README.adoc[AS2 Example] (as2) | Beginner | An example which demonstrates the use of the Camel AS2 component
@@ -176,8 +176,6 @@ Number of Examples: 77 (0 deprecated)
| link:main-micrometer/README.adoc[Main Micrometer] (main-micrometer) | Observability | Standalone Camel with Micrometer and Prometheus
-| link:reactive-executor-vertx/README.adoc[Reactive Executor Vertx] (reactive-executor-vertx) | Reactive | An example for showing using VertX as reactive executor with standalone Camel
-
| link:salesforce-consumer/README.adoc[Salesforce Consumer] (salesforce-consumer) | Social | An example that uses Salesforce Rest Streaming API
| link:telegram/README.adoc[Telegram] (telegram) | Social | An example that uses Telegram API
diff --git a/resume-api/resume-api-aws2-kinesis/pom.xml b/resume-api/resume-api-aws2-kinesis/pom.xml
index 1b058787..fabdda54 100644
--- a/resume-api/resume-api-aws2-kinesis/pom.xml
+++ b/resume-api/resume-api-aws2-kinesis/pom.xml
@@ -31,6 +31,7 @@
<description>An example for showing the Resume API for consuming AWS Kinesis data streams.</description>
<properties>
+ <category>Advanced</category>
<resume.main.class>org.apache.camel.example.resume.aws.kinesis.main.MainApp</resume.main.class>
</properties>
diff --git a/resume-api/resume-api-cassandraql/pom.xml b/resume-api/resume-api-cassandraql/pom.xml
index e21c9da2..6ab8101a 100644
--- a/resume-api/resume-api-cassandraql/pom.xml
+++ b/resume-api/resume-api-cassandraql/pom.xml
@@ -31,6 +31,7 @@
<description>An example for showing the Resume API for consuming data from Apache Cassandra.</description>
<properties>
+ <category>Advanced</category>
<resume.main.class>org.apache.camel.example.resume.cassandra.main.MainApp</resume.main.class>
</properties>
diff --git a/resume-api/resume-api-file-offset/pom.xml b/resume-api/resume-api-file-offset/pom.xml
index 5b0f3922..5945199e 100644
--- a/resume-api/resume-api-file-offset/pom.xml
+++ b/resume-api/resume-api-file-offset/pom.xml
@@ -31,6 +31,7 @@
<description>An example for showing the Resume API for processing a large file.</description>
<properties>
+ <category>Advanced</category>
<resume.main.class>org.apache.camel.example.resume.file.offset.main.MainApp</resume.main.class>
</properties>
diff --git a/resume-api/resume-api-fileset-clusterized/pom.xml b/resume-api/resume-api-fileset-clusterized/pom.xml
index 07da720a..b2ebd50f 100644
--- a/resume-api/resume-api-fileset-clusterized/pom.xml
+++ b/resume-api/resume-api-fileset-clusterized/pom.xml
@@ -31,6 +31,7 @@
<description>An example for showing the Resume API for processing a large directory in clusterized mode.</description>
<properties>
+ <category>Advanced</category>
<resume.main.class>org.apache.camel.example.resume.fileset.clusterized.main.MainApp</resume.main.class>
</properties>
diff --git a/resume-api/resume-api-fileset-wal/pom.xml b/resume-api/resume-api-fileset-wal/pom.xml
index 12dfaea1..647b7342 100644
--- a/resume-api/resume-api-fileset-wal/pom.xml
+++ b/resume-api/resume-api-fileset-wal/pom.xml
@@ -31,6 +31,7 @@
<description>An example for showing the Resume API for processing a large directory using the write ahead log.</description>
<properties>
+ <category>Advanced</category>
<resume.main.class>org.apache.camel.example.resume.fileset.wal.main.MainApp</resume.main.class>
</properties>
@@ -42,7 +43,6 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-wal</artifactId>
- <version>4.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel.example</groupId>
diff --git a/resume-api/resume-api-fileset/pom.xml b/resume-api/resume-api-fileset/pom.xml
index fb0afea3..b40dfc04 100644
--- a/resume-api/resume-api-fileset/pom.xml
+++ b/resume-api/resume-api-fileset/pom.xml
@@ -31,6 +31,7 @@
<description>An example for showing the Resume API for processing a large directory.</description>
<properties>
+ <category>Advanced</category>
<resume.main.class>org.apache.camel.example.resume.fileset.main.MainApp</resume.main.class>
</properties>
(camel-examples) 01/02: Remove example that is not for the future
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-examples.git
commit cacf35049e6402e523cc363b9f3e217f486fb121
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Oct 30 11:06:26 2024 +0100
Remove example that is not for the future
---
pom.xml | 1 -
reactive-executor-vertx/README.adoc | 35 -------
reactive-executor-vertx/pom.xml | 106 ---------------------
.../org/apache/camel/example/MyApplication.java | 61 ------------
.../org/apache/camel/example/MyRouteBuilder.java | 31 ------
.../src/main/resources/application.properties | 27 ------
.../src/main/resources/log4j2.properties | 23 -----
.../java/org/apache/camel/example/VertxTest.java | 61 ------------
8 files changed, 345 deletions(-)
diff --git a/pom.xml b/pom.xml
index b3bebc3f..e0b921a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,7 +124,6 @@
<module>mongodb</module>
<module>netty-custom-correlation</module>
<module>oaipmh</module>
- <module>reactive-executor-vertx</module>
<module>resume-api</module>
<module>routeloader</module>
<module>routetemplate</module>
diff --git a/reactive-executor-vertx/README.adoc b/reactive-executor-vertx/README.adoc
deleted file mode 100644
index 0a2f06d6..00000000
--- a/reactive-executor-vertx/README.adoc
+++ /dev/null
@@ -1,35 +0,0 @@
-== Camel Example Reactive Executor VertX
-
-This example uses VertX as the reactive executor for routing messages with Camel.
-By default, Camel uses its own reactive engine for routing messages, but you can plug in
-different engines via a SPI interface. This example uses VertX as the engine.
-
-=== Build
-
-You will need to compile this example first:
-
-----
-$ mvn compile
-----
-
-=== How to run
-
-You can run this example using
-
-----
-$ mvn camel:run
-----
-
-=== More information
-
-You can find more information about Apache Camel at the website: http://camel.apache.org/
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/reactive-executor-vertx/pom.xml b/reactive-executor-vertx/pom.xml
deleted file mode 100644
index 504ef5cb..00000000
--- a/reactive-executor-vertx/pom.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>camel-examples</artifactId>
- <version>4.9.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-reactive-executor-vertx</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Example :: Reactive Executor :: VertX</name>
- <description>An example for showing using VertX as reactive executor with standalone Camel</description>
-
- <properties>
- <category>Reactive</category>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-reactive-executor-vertx</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-threadpoolfactory-vertx</artifactId>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j2-impl</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-main-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <!-- Allows the example to be run via 'mvn camel:run' -->
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-maven-plugin</artifactId>
- <version>${camel.version}</version>
- <configuration>
- <mainClass>org.apache.camel.example.MyApplication</mainClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/reactive-executor-vertx/src/main/java/org/apache/camel/example/MyApplication.java b/reactive-executor-vertx/src/main/java/org/apache/camel/example/MyApplication.java
deleted file mode 100644
index 4a564fc3..00000000
--- a/reactive-executor-vertx/src/main/java/org/apache/camel/example/MyApplication.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.example;
-
-import io.vertx.core.Vertx;
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.CamelContext;
-import org.apache.camel.Configuration;
-import org.apache.camel.main.Main;
-import org.apache.camel.support.LifecycleStrategySupport;
-
-/**
- * Main class that boot the Camel application
- */
-public final class MyApplication {
-
- private MyApplication() {
- }
-
- public static void main(String[] args) throws Exception {
- // use Camels Main class
- Main main = new Main(MyApplication.class);
- // now keep the application running until the JVM is terminated (ctrl + c or sigterm)
- main.run(args);
- }
-
- @Configuration
- static class MyConfiguration {
-
- @BindToRegistry(value = "vertx", beanPostProcess = true)
- public Vertx vertx(CamelContext camelContext) {
- // register existing vertx which should be used by Camel
- final Vertx vertx = Vertx.vertx();
- // register 'vertx' bean stop lifecycle hook
- camelContext.addLifecycleStrategy(new LifecycleStrategySupport() {
- @Override
- public void onContextStopped(CamelContext context) {
- super.onContextStopped(context);
- // stop vertx
- vertx.close();
- }
- });
- return vertx;
- }
- }
-
-}
diff --git a/reactive-executor-vertx/src/main/java/org/apache/camel/example/MyRouteBuilder.java b/reactive-executor-vertx/src/main/java/org/apache/camel/example/MyRouteBuilder.java
deleted file mode 100644
index 91acfebc..00000000
--- a/reactive-executor-vertx/src/main/java/org/apache/camel/example/MyRouteBuilder.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.example;
-
-import org.apache.camel.builder.RouteBuilder;
-
-public class MyRouteBuilder extends RouteBuilder {
-
- @Override
- public void configure() throws Exception {
- from("timer:foo?period=5s")
- .setBody().constant("H,e,l,l,o, ,W,o,r,l,d,!,!,!, , ")
- .split(body().tokenize(",")).parallelProcessing()
- .log("${body}")
- .end();
- }
-}
diff --git a/reactive-executor-vertx/src/main/resources/application.properties b/reactive-executor-vertx/src/main/resources/application.properties
deleted file mode 100644
index 1d6d98b6..00000000
--- a/reactive-executor-vertx/src/main/resources/application.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# here you can configure options on camel main
-# https://camel.apache.org/components/next/others/main.html
-camel.main.name = MyVertXCamel
-
-# you can also configure camel context directly
-# camel.context.shutdown-strategy.shutdown-now-on-timeout = false
-
-# application properties
-hi = Hello
-
diff --git a/reactive-executor-vertx/src/main/resources/log4j2.properties b/reactive-executor-vertx/src/main/resources/log4j2.properties
deleted file mode 100644
index d406a9f6..00000000
--- a/reactive-executor-vertx/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.out.ref = out
diff --git a/reactive-executor-vertx/src/test/java/org/apache/camel/example/VertxTest.java b/reactive-executor-vertx/src/test/java/org/apache/camel/example/VertxTest.java
deleted file mode 100644
index d90747c1..00000000
--- a/reactive-executor-vertx/src/test/java/org/apache/camel/example/VertxTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.example;
-
-import java.util.concurrent.TimeUnit;
-
-import io.vertx.core.Vertx;
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.main.MainConfigurationProperties;
-import org.apache.camel.spi.Registry;
-import org.apache.camel.test.main.junit5.CamelMainTestSupport;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
- * A unit test checking that Camel can use VertX as reactive executor.
- */
-class VertxTest extends CamelMainTestSupport {
-
- @AfterEach
- void destroy() {
- Vertx vertx = context.getRegistry().lookupByNameAndType("vertx", Vertx.class);
- if (vertx != null) {
- vertx.close();
- }
- }
-
- @Override
- protected void bindToRegistry(Registry registry) throws Exception {
- registry.bind("vertx", Vertx.vertx());
- }
-
- @Test
- void should_use_vertx_as_reactive_executor() {
- NotifyBuilder notify = new NotifyBuilder(context).from("timer:*").whenCompleted(15).create();
- assertTrue(
- notify.matches(30, TimeUnit.SECONDS), "15 messages should be completed"
- );
- }
-
- @Override
- protected void configure(MainConfigurationProperties configuration) {
- configuration.addRoutesBuilder(MyRouteBuilder.class);
- }
-}