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

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

commit 8178dc9486e390f0a1b9009d0d0682a11b2ac378
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Fri Nov 8 14:05:11 2019 +0100

    feat: controlbus extension.
---
 .../pages/list-of-camel-quarkus-extensions.adoc    |   5 +-
 extensions/controlbus/deployment/pom.xml           |  75 +++++++++++
 .../controlbus/deployment/ControlbusProcessor.java |  31 +++++
 extensions/controlbus/pom.xml                      |  39 ++++++
 extensions/controlbus/runtime/pom.xml              |  82 ++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  10 ++
 extensions/pom.xml                                 |   1 +
 extensions/readme.adoc                             |   5 +-
 integration-tests/controlbus/pom.xml               | 140 +++++++++++++++++++++
 .../controlbus/it/ControlbusResource.java          |  65 ++++++++++
 .../component/controlbus/it/ControlbusRoute.java   |  36 ++++++
 .../component/controlbus/it/ControlbusIT.java      |  24 ++++
 .../component/controlbus/it/ControlbusTest.java    |  49 ++++++++
 integration-tests/pom.xml                          |   1 +
 poms/bom-deployment/pom.xml                        |   5 +
 poms/bom/pom.xml                                   |  10 ++
 16 files changed, 576 insertions(+), 2 deletions(-)

diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc 
b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index a04a5fa..3fe5138 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -6,7 +6,7 @@ As of Camel Quarkus {camel-quarkus-last-release} the following 
Camel artifacts a
 == Camel Components
 
 // components: START
-Number of Camel components: 27 in 23 JAR artifacts (0 deprecated)
+Number of Camel components: 28 in 24 JAR artifacts (0 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -30,6 +30,9 @@ Number of Camel components: 27 in 23 JAR artifacts (0 
deprecated)
 | link:https://camel.apache.org/components/latest/class-component.html[Class] 
(camel-quarkus-bean) +
 `class:beanName` | 0.2 | The class component is for invoking Java classes 
(Java beans) from Camel.
 
+| 
link:https://camel.apache.org/components/latest/controlbus-component.html[Control
 Bus] (camel-quarkus-controlbus) +
+`controlbus:command:language` | 0.4 | The controlbus component provides easy 
management of Camel applications based on the Control Bus EIP pattern.
+
 | 
link:https://camel.apache.org/components/latest/direct-component.html[Direct] 
(camel-quarkus-direct) +
 `direct:name` | 0.2 | The direct component provides direct, synchronous call 
to another endpoint from the same CamelContext.
 
diff --git a/extensions/controlbus/deployment/pom.xml 
b/extensions/controlbus/deployment/pom.xml
new file mode 100644
index 0000000..1aaef9a
--- /dev/null
+++ b/extensions/controlbus/deployment/pom.xml
@@ -0,0 +1,75 @@
+<?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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-controlbus-parent</artifactId>
+        <version>0.3.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-controlbus-deployment</artifactId>
+    <name>Camel Quarkus :: ControlBus :: Deployment</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-deployment</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-controlbus</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            
<artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git 
a/extensions/controlbus/deployment/src/main/java/org/apache/camel/quarkus/component/controlbus/deployment/ControlbusProcessor.java
 
b/extensions/controlbus/deployment/src/main/java/org/apache/camel/quarkus/component/controlbus/deployment/ControlbusProcessor.java
new file mode 100644
index 0000000..01b09e6
--- /dev/null
+++ 
b/extensions/controlbus/deployment/src/main/java/org/apache/camel/quarkus/component/controlbus/deployment/ControlbusProcessor.java
@@ -0,0 +1,31 @@
+/*
+ * 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.quarkus.component.controlbus.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+
+class ControlbusProcessor {
+
+    private static final String FEATURE = "camel-controlbus";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+}
diff --git a/extensions/controlbus/pom.xml b/extensions/controlbus/pom.xml
new file mode 100644
index 0000000..5b692af
--- /dev/null
+++ b/extensions/controlbus/pom.xml
@@ -0,0 +1,39 @@
+<?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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-build-parent</artifactId>
+        <version>0.3.2-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-controlbus-parent</artifactId>
+    <name>Camel Quarkus :: ControlBus</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+    </modules>
+</project>
diff --git a/extensions/controlbus/runtime/pom.xml 
b/extensions/controlbus/runtime/pom.xml
new file mode 100644
index 0000000..7940db4
--- /dev/null
+++ b/extensions/controlbus/runtime/pom.xml
@@ -0,0 +1,82 @@
+<?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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-controlbus-parent</artifactId>
+        <version>0.3.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-controlbus</artifactId>
+    <name>Camel Quarkus :: ControlBus :: Runtime</name>
+
+    <properties>
+        <firstVersion>0.4.0</firstVersion>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-controlbus</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            
<artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git 
a/extensions/controlbus/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 
b/extensions/controlbus/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..0713db8
--- /dev/null
+++ 
b/extensions/controlbus/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,10 @@
+---
+name: "Camel Quarkus ControlBus"
+description: "Camel ControlBus support"
+metadata:
+  keywords:
+  - "camel"
+  - "monitoring"
+  guide: "https://quarkus.io/guides/camel";
+  categories:
+  - "integration"
\ No newline at end of file
diff --git a/extensions/pom.xml b/extensions/pom.xml
index c2c9a66..a5eaf39 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -74,6 +74,7 @@
         <module>zipfile</module>
         <module>attachments</module>
         <module>pdf</module>
+        <module>controlbus</module>
     </modules>
 
     <build>
diff --git a/extensions/readme.adoc b/extensions/readme.adoc
index af2a488..abba2f4 100644
--- a/extensions/readme.adoc
+++ b/extensions/readme.adoc
@@ -5,7 +5,7 @@ Apache Camel Quarkus supports the following Camel artifacts as 
Quarkus Extension
 == Camel Components
 
 // components: START
-Number of Camel components: 27 in 23 JAR artifacts (0 deprecated)
+Number of Camel components: 28 in 24 JAR artifacts (0 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -29,6 +29,9 @@ Number of Camel components: 27 in 23 JAR artifacts (0 
deprecated)
 | link:https://camel.apache.org/components/latest/class-component.html[Class] 
(camel-quarkus-bean) +
 `class:beanName` | 0.2 | The class component is for invoking Java classes 
(Java beans) from Camel.
 
+| 
link:https://camel.apache.org/components/latest/controlbus-component.html[Control
 Bus] (camel-quarkus-controlbus) +
+`controlbus:command:language` | 0.4 | The controlbus component provides easy 
management of Camel applications based on the Control Bus EIP pattern.
+
 | 
link:https://camel.apache.org/components/latest/direct-component.html[Direct] 
(camel-quarkus-direct) +
 `direct:name` | 0.2 | The direct component provides direct, synchronous call 
to another endpoint from the same CamelContext.
 
diff --git a/integration-tests/controlbus/pom.xml 
b/integration-tests/controlbus/pom.xml
new file mode 100644
index 0000000..66cf10b
--- /dev/null
+++ b/integration-tests/controlbus/pom.xml
@@ -0,0 +1,140 @@
+<?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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-integration-tests</artifactId>
+        <version>0.3.2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-quarkus-integration-test-controlbus</artifactId>
+    <name>Camel Quarkus :: Integration Tests :: ControlBus</name>
+    <description>Integration tests for Camel Quarkus ControlBus 
extension</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-controlbus</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-log</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-direct</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-timer</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>native</id>
+            <activation>
+                <property>
+                    <name>native</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                                <configuration>
+                                    <systemProperties>
+                                        
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
+                                    </systemProperties>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>io.quarkus</groupId>
+                        <artifactId>quarkus-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>native-image</id>
+                                <goals>
+                                    <goal>native-image</goal>
+                                </goals>
+                                <configuration>
+                                    
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
+                                    <cleanupServer>true</cleanupServer>
+                                    
<enableHttpsUrlHandler>true</enableHttpsUrlHandler>
+                                    <enableServer>false</enableServer>
+                                    <dumpProxies>false</dumpProxies>
+                                    <graalvmHome>${graalvmHome}</graalvmHome>
+                                    <enableJni>true</enableJni>
+                                    
<enableAllSecurityServices>true</enableAllSecurityServices>
+                                    <disableReports>true</disableReports>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
diff --git 
a/integration-tests/controlbus/src/main/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusResource.java
 
b/integration-tests/controlbus/src/main/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusResource.java
new file mode 100644
index 0000000..1f45b48
--- /dev/null
+++ 
b/integration-tests/controlbus/src/main/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusResource.java
@@ -0,0 +1,65 @@
+/*
+ * 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.quarkus.component.controlbus.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.camel.ProducerTemplate;
+import org.jboss.logging.Logger;
+
+@Path("/controlbus")
+@ApplicationScoped
+public class ControlbusResource {
+
+    private static final Logger LOG = 
Logger.getLogger(ControlbusResource.class);
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Path("/status")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String status() throws Exception {
+        final String message = producerTemplate.requestBody("direct:status", 
"", String.class);
+        LOG.infof("Received from controlbus: %s", message);
+        return message;
+    }
+
+    @Path("/start")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String start() throws Exception {
+        final String message = producerTemplate.requestBody("direct:start", 
"", String.class);
+        LOG.infof("Received from controlbus: %s", message);
+        return message;
+    }
+
+    @Path("/stop")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String stop() throws Exception {
+        final String message = producerTemplate.requestBody("direct:stop", "", 
String.class);
+        LOG.infof("Received from controlbus: %s", message);
+        return message;
+    }
+
+}
diff --git 
a/integration-tests/controlbus/src/main/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusRoute.java
 
b/integration-tests/controlbus/src/main/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusRoute.java
new file mode 100644
index 0000000..4ae1f6b
--- /dev/null
+++ 
b/integration-tests/controlbus/src/main/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusRoute.java
@@ -0,0 +1,36 @@
+/*
+ * 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.quarkus.component.controlbus.it;
+
+import org.apache.camel.builder.RouteBuilder;
+
+public class ControlbusRoute extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("timer:foo").routeId("foo").log("Foo route");
+
+        from("direct:status")
+                .transform().exchange(e -> 
e.getContext().getRouteController().getRouteStatus("foo").name());
+
+        from("direct:stop")
+                .to("controlbus:route?routeId=foo&action=stop");
+
+        from("direct:start")
+                .to("controlbus:route?routeId=foo&action=start");
+    }
+}
diff --git 
a/integration-tests/controlbus/src/test/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusIT.java
 
b/integration-tests/controlbus/src/test/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusIT.java
new file mode 100644
index 0000000..24700f5
--- /dev/null
+++ 
b/integration-tests/controlbus/src/test/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusIT.java
@@ -0,0 +1,24 @@
+/*
+ * 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.quarkus.component.controlbus.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+
+@NativeImageTest
+class ControlbusIT extends ControlbusTest {
+
+}
diff --git 
a/integration-tests/controlbus/src/test/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusTest.java
 
b/integration-tests/controlbus/src/test/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusTest.java
new file mode 100644
index 0000000..37c76dd
--- /dev/null
+++ 
b/integration-tests/controlbus/src/test/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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.quarkus.component.controlbus.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import io.restassured.response.ExtractableResponse;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class ControlbusTest {
+
+    @Test
+    public void test() {
+        ExtractableResponse response = RestAssured.given()
+                .contentType(ContentType.TEXT).get("/controlbus/status")
+                .then().extract();
+
+        String body = response.body().asString();
+        Assertions.assertEquals("Started", body);
+
+        RestAssured.given()
+                .contentType(ContentType.TEXT).get("/controlbus/stop")
+                .then().statusCode(200);
+        response = RestAssured.given()
+                .contentType(ContentType.TEXT).get("/controlbus/status")
+                .then().extract();
+
+        body = response.body().asString();
+        Assertions.assertEquals("Stopped", body);
+    }
+
+}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index f865393..2f4cc76 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -103,6 +103,7 @@
         <module>twitter</module>
         <module>zipfile</module>
         <module>pdf</module>
+        <module>controlbus</module>
     </modules>
 
     <build>
diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml
index 8dce796..8c65121 100644
--- a/poms/bom-deployment/pom.xml
+++ b/poms/bom-deployment/pom.xml
@@ -268,6 +268,11 @@
                 <artifactId>camel-quarkus-netty-deployment</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-controlbus-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
 
         </dependencies>
     </dependencyManagement>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index f012301..db8c159 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -106,6 +106,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-controlbus</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-core-engine</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -530,6 +535,11 @@
                 <artifactId>camel-quarkus-netty</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-controlbus</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
 
         </dependencies>
     </dependencyManagement>

Reply via email to