You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2018/05/30 10:04:59 UTC
[camel] 07/20: CAMEL-12518: camel cloud : leverage spring-cloud
ServiceRegistry to register routes
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 8b696605be567ace0d2da4cb880abe222bb05b15
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Thu May 17 17:02:40 2018 +0200
CAMEL-12518: camel cloud : leverage spring-cloud ServiceRegistry to register routes
---
apache-camel/pom.xml | 18 ++
apache-camel/src/main/descriptors/common-bin.xml | 4 +
bom/camel-bom/pom.xml | 20 ++
components/camel-spring-cloud-consul/pom.xml | 227 +++++++++++++++++
.../src/main/docs/spring-cloud-consul.adoc | 3 +
.../consul/CamelCloudConsulAutoConfiguration.java | 53 ++++
.../ServiceDefinitionToConsulRegistration.java | 50 ++++
.../src/main/resources/META-INF/LICENSE.txt | 203 +++++++++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 +
.../src/main/resources/META-INF/spring.factories | 2 +-
.../CamelCloudConsulAutoConfigurationTest.java | 69 ++++++
.../CamelCloudConsulServiceRegistryTest.java | 103 ++++++++
.../consul/support/ConsulContainerLogger.java | 31 +++
.../consul/support/ConsulContainerSupport.java | 41 ++++
.../support/ConsulContainerWaitStrategy.java | 48 ++++
.../src/test/resources/logback.xml | 42 ++++
components/camel-spring-cloud-zookeeper/pom.xml | 161 ++++++++++++
.../src/main/docs/spring-cloud-zookeeper.adoc | 3 +
.../CamelCloudZookeeperAutoConfiguration.java | 53 ++++
.../ServiceDefinitionToZookeeperRegistration.java | 46 ++++
.../src/main/resources/META-INF/LICENSE.txt | 203 +++++++++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 +
.../src/main/resources/META-INF/spring.factories | 2 +-
.../CamelCloudZookeeperAutoConfigurationTest.java | 85 +++++++
.../CamelCloudZookeeperServiceRegistryTest.java | 129 ++++++++++
.../cloud/zookeeper/support/ZookeeperServer.java | 62 +++++
.../src/test/resources/logback.xml | 43 ++++
...pringCloudDiscoveryClientAutoConfiguration.java | 2 +-
.../cloud/CamelSpringCloudServiceRegistry.java | 150 ++++++++++++
...ringCloudServiceRegistryAutoConfiguration.java} | 39 +--
.../src/main/resources/META-INF/spring.factories | 4 +-
.../CamelSpringCloudServiceCallRibbonTest.java | 7 +-
.../cloud/CamelSpringCloudServiceRegistryTest.java | 271 +++++++++++++++++++++
components/pom.xml | 2 +
components/readme.adoc | 8 +-
docs/user-manual/en/SUMMARY.md | 2 +
parent/pom.xml | 22 ++
.../camel-spring-cloud-consul-starter/pom.xml | 65 +++++
.../src/main/resources/META-INF/LICENSE.txt | 203 +++++++++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 +
.../src/main/resources/META-INF/spring.provides | 17 ++
.../camel-spring-cloud-zookeeper-starter/pom.xml | 65 +++++
.../src/main/resources/META-INF/LICENSE.txt | 203 +++++++++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 +
.../src/main/resources/META-INF/spring.provides | 17 ++
platforms/spring-boot/components-starter/pom.xml | 2 +
.../camel-spring-boot-dependencies/pom.xml | 20 ++
47 files changed, 2816 insertions(+), 28 deletions(-)
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index 76da53b..51c2868 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -995,10 +995,18 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-consul</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-cloud-netflix</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-zookeeper</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-integration</artifactId>
</dependency>
<dependency>
@@ -2284,11 +2292,21 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-consul-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-cloud-netflix-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-zookeeper-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-integration-starter</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/apache-camel/src/main/descriptors/common-bin.xml b/apache-camel/src/main/descriptors/common-bin.xml
index d48a9f5..d8b53a8 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -257,7 +257,9 @@
<include>org.apache.camel:camel-spring</include>
<include>org.apache.camel:camel-spring-batch</include>
<include>org.apache.camel:camel-spring-cloud</include>
+ <include>org.apache.camel:camel-spring-cloud-consul</include>
<include>org.apache.camel:camel-spring-cloud-netflix</include>
+ <include>org.apache.camel:camel-spring-cloud-zookeeper</include>
<include>org.apache.camel:camel-spring-integration</include>
<include>org.apache.camel:camel-spring-javaconfig</include>
<include>org.apache.camel:camel-spring-ldap</include>
@@ -566,7 +568,9 @@
<include>org.apache.camel:camel-spring-boot</include>
<include>org.apache.camel:camel-spring-boot-starter</include>
<include>org.apache.camel:camel-spring-cloud-starter</include>
+ <include>org.apache.camel:camel-spring-cloud-consul-starter</include>
<include>org.apache.camel:camel-spring-cloud-netflix-starter</include>
+ <include>org.apache.camel:camel-spring-cloud-zookeeper-starter</include>
<include>org.apache.camel:camel-spring-integration-starter</include>
<include>org.apache.camel:camel-spring-javaconfig-starter</include>
<include>org.apache.camel:camel-spring-ldap-starter</include>
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index f75a25b..3402e64 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -2385,6 +2385,16 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-consul</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-consul-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-cloud-netflix</artifactId>
<version>${project.version}</version>
</dependency>
@@ -2400,6 +2410,16 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-zookeeper</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-zookeeper-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-integration</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/components/camel-spring-cloud-consul/pom.xml b/components/camel-spring-cloud-consul/pom.xml
new file mode 100644
index 0000000..7cb5de4
--- /dev/null
+++ b/components/camel-spring-cloud-consul/pom.xml
@@ -0,0 +1,227 @@
+<?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</groupId>
+ <artifactId>components</artifactId>
+ <version>2.22.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Camel :: Spring Cloud Consul</name>
+ <artifactId>camel-spring-cloud-consul</artifactId>
+ <description>Camel Cloud integration with Spring Cloud Consul</description>
+
+ <properties>
+ <!-- use by camel-catalog -->
+ <firstVersion>2.19.0</firstVersion>
+ <label>spring,microservice</label>
+
+ <camel.osgi.export.pkg/>
+
+ <spring-cloud-commons-version>2.0.0.RC1</spring-cloud-commons-version>
+ <spring-cloud-consul-version>2.0.0.RC1</spring-cloud-consul-version>
+ </properties>
+
+ <!-- spring-cloud with support for spring boot 2 is not in maven central yet -->
+ <repositories>
+ <repository>
+ <id>spring-milestones</id>
+ <name>Spring Milestones</name>
+ <url>https://repo.spring.io/libs-milestone</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-autoconfigure</artifactId>
+ <version>${spring-boot-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter</artifactId>
+ <version>${spring-cloud-commons-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-consul-discovery</artifactId>
+ <version>${spring-cloud-consul-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-consul-core</artifactId>
+ <version>${spring-cloud-consul-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-configuration-processor</artifactId>
+ <optional>true</optional>
+ <version>${spring-boot-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-boot</artifactId>
+ </dependency>
+
+ <!-- Testing dependencies -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-spring</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-http4</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-jetty</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <version>${spring-boot-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <version>${spring-boot-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <version>${spring-boot-version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- testing (docker) -->
+ <dependency>
+ <groupId>org.testcontainers</groupId>
+ <artifactId>testcontainers</artifactId>
+ <version>${testcontainers-version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkCount>1</forkCount>
+ <reuseForks>false</reuseForks>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>consul-skip-tests</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- activate test if the docker socket file is accessible -->
+ <profile>
+ <id>consul-tests-docker-file</id>
+ <activation>
+ <file>
+ <exists>/var/run/docker.sock</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>false</skipTests>
+ <systemPropertyVariables>
+ <visibleassertions.silence>true</visibleassertions.silence>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- activate test if the DOCKER_HOST env var is set -->
+ <profile>
+ <id>consul-tests-docker-env</id>
+ <activation>
+ <property>
+ <name>env.DOCKER_HOST</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>false</skipTests>
+ <systemPropertyVariables>
+ <visibleassertions.silence>true</visibleassertions.silence>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+
+</project>
diff --git a/components/camel-spring-cloud-consul/src/main/docs/spring-cloud-consul.adoc b/components/camel-spring-cloud-consul/src/main/docs/spring-cloud-consul.adoc
new file mode 100644
index 0000000..e027756
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/main/docs/spring-cloud-consul.adoc
@@ -0,0 +1,3 @@
+=== Spring Cloud Consul
+
+*Available as of Camel 2.22*
diff --git a/components/camel-spring-cloud-consul/src/main/java/org/apache/camel/spring/cloud/consul/CamelCloudConsulAutoConfiguration.java b/components/camel-spring-cloud-consul/src/main/java/org/apache/camel/spring/cloud/consul/CamelCloudConsulAutoConfiguration.java
new file mode 100644
index 0000000..c83fbc2
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/main/java/org/apache/camel/spring/cloud/consul/CamelCloudConsulAutoConfiguration.java
@@ -0,0 +1,53 @@
+/**
+ * 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.spring.cloud.consul;
+
+import org.apache.camel.cloud.ServiceDefinition;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.spring.cloud.CamelSpringCloudServiceRegistryAutoConfiguration;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+import org.springframework.cloud.consul.ConditionalOnConsulEnabled;
+import org.springframework.cloud.consul.serviceregistry.ConsulRegistration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.converter.Converter;
+
+@Configuration
+@AutoConfigureBefore(CamelSpringCloudServiceRegistryAutoConfiguration.class)
+@ConditionalOnConsulEnabled
+@Conditional(CamelCloudConsulAutoConfiguration.Condition.class)
+public class CamelCloudConsulAutoConfiguration {
+
+ @Bean(name = "service-definition-to-consul-registration")
+ public Converter<ServiceDefinition, ConsulRegistration> serviceDefinitionToConsulRegistration() {
+ return new ServiceDefinitionToConsulRegistration();
+ }
+
+ // *******************************
+ // Condition
+ // *******************************
+
+ public static class Condition extends GroupCondition {
+ public Condition() {
+ super(
+ "camel.cloud",
+ "camel.cloud.consul"
+ );
+ }
+ }
+}
diff --git a/components/camel-spring-cloud-consul/src/main/java/org/apache/camel/spring/cloud/consul/ServiceDefinitionToConsulRegistration.java b/components/camel-spring-cloud-consul/src/main/java/org/apache/camel/spring/cloud/consul/ServiceDefinitionToConsulRegistration.java
new file mode 100644
index 0000000..443fc98
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/main/java/org/apache/camel/spring/cloud/consul/ServiceDefinitionToConsulRegistration.java
@@ -0,0 +1,50 @@
+/**
+ * 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.spring.cloud.consul;
+
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import com.ecwid.consul.v1.agent.model.NewService;
+import org.apache.camel.cloud.ServiceDefinition;
+import org.springframework.cloud.consul.serviceregistry.ConsulRegistration;
+import org.springframework.core.convert.converter.Converter;
+
+public final class ServiceDefinitionToConsulRegistration implements Converter<ServiceDefinition, ConsulRegistration> {
+
+ @Override
+ public ConsulRegistration convert(ServiceDefinition source) {
+ NewService service = new NewService();
+ service.setName(source.getName());
+ service.setId(source.getId());
+ service.setAddress(source.getHost());
+ service.setPort(source.getPort());
+
+ service.setTags(
+ source.getMetadata().entrySet().stream()
+ .map(e -> e.getKey() + "=" + e.getValue())
+ .collect(Collectors.toList())
+ );
+
+ return new ConsulRegistration(service, null) {
+ @Override
+ public boolean isSecure() {
+ return service.getPort() == 443 || Objects.equals("https", source.getMetadata().get(ServiceDefinition.SERVICE_META_PROTOCOL));
+ }
+ };
+ }
+}
diff --git a/components/camel-spring-cloud-consul/src/main/resources/META-INF/LICENSE.txt b/components/camel-spring-cloud-consul/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
diff --git a/components/camel-spring-cloud-consul/src/main/resources/META-INF/NOTICE.txt b/components/camel-spring-cloud-consul/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 0000000..2e215bf
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,11 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Camel distribution. ==
+ =========================================================================
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ Please read the different LICENSE files present in the licenses directory of
+ this distribution.
diff --git a/components/camel-spring-cloud/src/main/resources/META-INF/spring.factories b/components/camel-spring-cloud-consul/src/main/resources/META-INF/spring.factories
similarity index 91%
copy from components/camel-spring-cloud/src/main/resources/META-INF/spring.factories
copy to components/camel-spring-cloud-consul/src/main/resources/META-INF/spring.factories
index 9de8f8b..56dd79f 100644
--- a/components/camel-spring-cloud/src/main/resources/META-INF/spring.factories
+++ b/components/camel-spring-cloud-consul/src/main/resources/META-INF/spring.factories
@@ -16,4 +16,4 @@
#
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.spring.cloud.CamelSpringCloudServiceLoadBalancerAutoConfiguration
+ org.apache.camel.spring.cloud.consul.CamelCloudConsulAutoConfiguration
\ No newline at end of file
diff --git a/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/CamelCloudConsulAutoConfigurationTest.java b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/CamelCloudConsulAutoConfigurationTest.java
new file mode 100644
index 0000000..83e50df
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/CamelCloudConsulAutoConfigurationTest.java
@@ -0,0 +1,69 @@
+/**
+ * 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.spring.cloud.consul;
+
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Test;
+import org.springframework.boot.WebApplicationType;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.converter.Converter;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class CamelCloudConsulAutoConfigurationTest {
+ @Test
+ public void testServiceDefinitionToConsulRegistration() throws Exception {
+ ConfigurableApplicationContext context = new SpringApplicationBuilder(TestConfiguration.class)
+ .web(WebApplicationType.NONE)
+ .run(
+ "--debug=false",
+ "--spring.main.banner-mode=OFF",
+ "--spring.application.name=" + UUID.randomUUID().toString(),
+ "--ribbon.enabled=false",
+ "--ribbon.eureka.enabled=false",
+ "--management.endpoint.enabled=false",
+ "--spring.cloud.consul.enabled=true",
+ "--spring.cloud.consul.config.enabled=false",
+ "--spring.cloud.consul.discovery.enabled=true",
+ "--spring.cloud.service-registry.auto-registration.enabled=false"
+ );
+
+ try {
+ Map<String, Converter> converters = context.getBeansOfType(Converter.class);
+
+ assertThat(converters).isNotNull();
+ assertThat(converters.values().stream().anyMatch(ServiceDefinitionToConsulRegistration.class::isInstance)).isTrue();
+ } finally {
+ context.close();
+ }
+ }
+
+ // *************************************
+ // Config
+ // *************************************
+
+ @EnableAutoConfiguration
+ @Configuration
+ public static class TestConfiguration {
+ }
+}
+
diff --git a/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/CamelCloudConsulServiceRegistryTest.java b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/CamelCloudConsulServiceRegistryTest.java
new file mode 100644
index 0000000..b576351
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/CamelCloudConsulServiceRegistryTest.java
@@ -0,0 +1,103 @@
+/**
+ * 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.spring.cloud.consul;
+
+import java.util.List;
+import java.util.UUID;
+
+import com.ecwid.consul.v1.ConsulClient;
+import com.ecwid.consul.v1.QueryParams;
+import com.ecwid.consul.v1.catalog.model.CatalogService;
+import org.apache.camel.cloud.ServiceRegistry;
+import org.apache.camel.impl.cloud.DefaultServiceDefinition;
+import org.apache.camel.spring.cloud.consul.support.ConsulContainerSupport;
+import org.junit.Rule;
+import org.junit.Test;
+import org.springframework.boot.WebApplicationType;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.util.SocketUtils;
+import org.testcontainers.containers.GenericContainer;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class CamelCloudConsulServiceRegistryTest {
+ protected static final String SERVICE_ID = UUID.randomUUID().toString();
+ protected static final String SERVICE_NAME = "my-service";
+ protected static final String SERVICE_HOST = "localhost";
+ protected static final int SERVICE_PORT = SocketUtils.findAvailableTcpPort();
+
+ @Rule
+ public GenericContainer container = ConsulContainerSupport.consulContainer();
+
+ @Test
+ public void testServiceRegistry() throws Exception {
+ ConfigurableApplicationContext context = new SpringApplicationBuilder(TestConfiguration.class)
+ .web(WebApplicationType.NONE)
+ .run(
+ "--debug=false",
+ "--spring.main.banner-mode=OFF",
+ "--spring.application.name=" + UUID.randomUUID().toString(),
+ "--ribbon.enabled=false",
+ "--ribbon.eureka.enabled=false",
+ "--management.endpoint.enabled=false",
+ "--spring.cloud.consul.enabled=true",
+ "--spring.cloud.consul.host=" + container.getContainerIpAddress(),
+ "--spring.cloud.consul.port=" + container.getMappedPort(8500),
+ "--spring.cloud.consul.config.enabled=false",
+ "--spring.cloud.consul.discovery.enabled=true",
+ "--spring.cloud.service-registry.auto-registration.enabled=false"
+ );
+
+ try {
+ final ConsulClient client = context.getBean(ConsulClient.class);
+ final ServiceRegistry registry = context.getBean(ServiceRegistry.class);
+
+ registry.register(
+ DefaultServiceDefinition.builder()
+ .withHost(SERVICE_HOST)
+ .withPort(SERVICE_PORT)
+ .withName(SERVICE_NAME)
+ .withId(SERVICE_ID)
+ .build()
+ );
+
+ List<CatalogService> services = client.getCatalogService(SERVICE_NAME, QueryParams.DEFAULT).getValue();
+
+ assertThat(services).hasSize(1);
+ assertThat(services).first().hasFieldOrPropertyWithValue("serviceId", SERVICE_ID);
+ assertThat(services).first().hasFieldOrPropertyWithValue("serviceName", SERVICE_NAME);
+ assertThat(services).first().hasFieldOrPropertyWithValue("serviceAddress", SERVICE_HOST);
+ assertThat(services).first().hasFieldOrPropertyWithValue("servicePort", SERVICE_PORT);
+
+ } finally {
+ context.close();
+ }
+ }
+
+ // *************************************
+ // Config
+ // *************************************
+
+ @EnableAutoConfiguration
+ @Configuration
+ public static class TestConfiguration {
+ }
+}
+
diff --git a/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/support/ConsulContainerLogger.java b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/support/ConsulContainerLogger.java
new file mode 100644
index 0000000..59e5bf2
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/support/ConsulContainerLogger.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.spring.cloud.consul.support;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testcontainers.containers.output.Slf4jLogConsumer;
+
+public final class ConsulContainerLogger extends Slf4jLogConsumer {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ConsulContainerLogger.class);
+
+ public ConsulContainerLogger() {
+ super(LOGGER);
+
+ withPrefix("consul");
+ }
+}
diff --git a/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/support/ConsulContainerSupport.java b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/support/ConsulContainerSupport.java
new file mode 100644
index 0000000..677e582
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/support/ConsulContainerSupport.java
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.cloud.consul.support;
+
+import org.testcontainers.containers.GenericContainer;
+
+public final class ConsulContainerSupport {
+ private ConsulContainerSupport() {
+ }
+
+ public static GenericContainer consulContainer() {
+ return new GenericContainer("consul:1.0.0")
+ .withExposedPorts(8500)
+ .waitingFor(new ConsulContainerWaitStrategy())
+ .withLogConsumer(new ConsulContainerLogger())
+ .withCommand(
+ "agent",
+ "-dev",
+ "-server",
+ "-bootstrap",
+ "-client",
+ "0.0.0.0",
+ "-log-level",
+ "trace"
+ );
+ }
+}
diff --git a/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/support/ConsulContainerWaitStrategy.java b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/support/ConsulContainerWaitStrategy.java
new file mode 100644
index 0000000..5133d3c
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/test/java/org/apache/camel/spring/cloud/consul/support/ConsulContainerWaitStrategy.java
@@ -0,0 +1,48 @@
+/**
+ * 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.spring.cloud.consul.support;
+
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import com.github.dockerjava.api.DockerClient;
+import org.testcontainers.DockerClientFactory;
+import org.testcontainers.containers.ContainerLaunchException;
+import org.testcontainers.containers.output.WaitingConsumer;
+import org.testcontainers.containers.wait.strategy.AbstractWaitStrategy;
+import org.testcontainers.utility.LogUtils;
+
+public final class ConsulContainerWaitStrategy extends AbstractWaitStrategy {
+ @Override
+ protected void waitUntilReady() {
+ final DockerClient client = DockerClientFactory.instance().client();
+ final WaitingConsumer waitingConsumer = new WaitingConsumer();
+
+ LogUtils.followOutput(client, waitStrategyTarget.getContainerId(), waitingConsumer);
+
+ try {
+ waitingConsumer.waitUntil(
+ f -> f.getUtf8String().contains("Synced node info"),
+ startupTimeout.getSeconds(),
+ TimeUnit.SECONDS,
+ 1
+ );
+ } catch (TimeoutException e) {
+ throw new ContainerLaunchException("Timed out");
+ }
+ }
+}
\ No newline at end of file
diff --git a/components/camel-spring-cloud-consul/src/test/resources/logback.xml b/components/camel-spring-cloud-consul/src/test/resources/logback.xml
new file mode 100644
index 0000000..39280fd
--- /dev/null
+++ b/components/camel-spring-cloud-consul/src/test/resources/logback.xml
@@ -0,0 +1,42 @@
+<?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.
+
+-->
+<configuration>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%-15.15thread] %-5level %-30.30logger - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%-15.15thread] %-5level %-30.30logger - %msg%n</pattern>
+ </encoder>
+ <file>target/camel-spring-cloud-consul-test.log</file>
+ </appender>
+
+ <root level="INFO">
+ <!--<appender-ref ref="STDOUT"/>-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</configuration>
\ No newline at end of file
diff --git a/components/camel-spring-cloud-zookeeper/pom.xml b/components/camel-spring-cloud-zookeeper/pom.xml
new file mode 100644
index 0000000..0163165
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/pom.xml
@@ -0,0 +1,161 @@
+<?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</groupId>
+ <artifactId>components</artifactId>
+ <version>2.22.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Camel :: Spring Cloud Zookeeper</name>
+ <artifactId>camel-spring-cloud-zookeeper</artifactId>
+ <description>Camel Cloud integration with Spring Cloud Zookeeper</description>
+
+ <properties>
+ <!-- use by camel-catalog -->
+ <firstVersion>2.19.0</firstVersion>
+ <label>spring,microservice</label>
+
+ <camel.osgi.export.pkg/>
+
+ <spring-cloud-commons-version>2.0.0.RC1</spring-cloud-commons-version>
+ <spring-cloud-zookeeper-version>2.0.0.RC1</spring-cloud-zookeeper-version>
+ </properties>
+
+ <!-- spring-cloud with support for spring boot 2 is not in maven central yet -->
+ <repositories>
+ <repository>
+ <id>spring-milestones</id>
+ <name>Spring Milestones</name>
+ <url>https://repo.spring.io/libs-milestone</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-autoconfigure</artifactId>
+ <version>${spring-boot-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter</artifactId>
+ <version>${spring-cloud-commons-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-zookeeper-discovery</artifactId>
+ <version>${spring-cloud-zookeeper-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-zookeeper-core</artifactId>
+ <version>${spring-cloud-zookeeper-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-configuration-processor</artifactId>
+ <optional>true</optional>
+ <version>${spring-boot-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-boot</artifactId>
+ </dependency>
+
+ <!-- Testing dependencies -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-spring</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-http4</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-jetty</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <version>${spring-boot-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <version>${spring-boot-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <version>${spring-boot-version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- testing (docker) -->
+ <dependency>
+ <groupId>org.testcontainers</groupId>
+ <artifactId>testcontainers</artifactId>
+ <version>${testcontainers-version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkCount>1</forkCount>
+ <reuseForks>false</reuseForks>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/components/camel-spring-cloud-zookeeper/src/main/docs/spring-cloud-zookeeper.adoc b/components/camel-spring-cloud-zookeeper/src/main/docs/spring-cloud-zookeeper.adoc
new file mode 100644
index 0000000..942fa60
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/src/main/docs/spring-cloud-zookeeper.adoc
@@ -0,0 +1,3 @@
+=== Spring Cloud Zookeeper
+
+*Available as of Camel 2.22*
diff --git a/components/camel-spring-cloud-zookeeper/src/main/java/org/apache/camel/spring/cloud/zookeeper/CamelCloudZookeeperAutoConfiguration.java b/components/camel-spring-cloud-zookeeper/src/main/java/org/apache/camel/spring/cloud/zookeeper/CamelCloudZookeeperAutoConfiguration.java
new file mode 100644
index 0000000..85ba227
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/src/main/java/org/apache/camel/spring/cloud/zookeeper/CamelCloudZookeeperAutoConfiguration.java
@@ -0,0 +1,53 @@
+/**
+ * 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.spring.cloud.zookeeper;
+
+import org.apache.camel.cloud.ServiceDefinition;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.spring.cloud.CamelSpringCloudServiceRegistryAutoConfiguration;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+import org.springframework.cloud.zookeeper.ConditionalOnZookeeperEnabled;
+import org.springframework.cloud.zookeeper.serviceregistry.ZookeeperRegistration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.converter.Converter;
+
+@Configuration
+@AutoConfigureBefore(CamelSpringCloudServiceRegistryAutoConfiguration.class)
+@ConditionalOnZookeeperEnabled
+@Conditional(CamelCloudZookeeperAutoConfiguration.Condition.class)
+public class CamelCloudZookeeperAutoConfiguration {
+
+ @Bean(name = "service-definition-to-zookeeper-registration")
+ public Converter<ServiceDefinition, ZookeeperRegistration> serviceDefinitionToConsulRegistration() {
+ return new ServiceDefinitionToZookeeperRegistration();
+ }
+
+ // *******************************
+ // Condition
+ // *******************************
+
+ public static class Condition extends GroupCondition {
+ public Condition() {
+ super(
+ "camel.cloud",
+ "camel.cloud.zookeeper"
+ );
+ }
+ }
+}
diff --git a/components/camel-spring-cloud-zookeeper/src/main/java/org/apache/camel/spring/cloud/zookeeper/ServiceDefinitionToZookeeperRegistration.java b/components/camel-spring-cloud-zookeeper/src/main/java/org/apache/camel/spring/cloud/zookeeper/ServiceDefinitionToZookeeperRegistration.java
new file mode 100644
index 0000000..30cc93b
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/src/main/java/org/apache/camel/spring/cloud/zookeeper/ServiceDefinitionToZookeeperRegistration.java
@@ -0,0 +1,46 @@
+/**
+ * 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.spring.cloud.zookeeper;
+
+import org.apache.camel.cloud.ServiceDefinition;
+import org.springframework.cloud.zookeeper.discovery.ZookeeperDiscoveryProperties;
+import org.springframework.cloud.zookeeper.discovery.ZookeeperInstance;
+import org.springframework.cloud.zookeeper.serviceregistry.ServiceInstanceRegistration;
+import org.springframework.cloud.zookeeper.serviceregistry.ZookeeperRegistration;
+import org.springframework.core.convert.converter.Converter;
+
+public final class ServiceDefinitionToZookeeperRegistration implements Converter<ServiceDefinition, ZookeeperRegistration> {
+ public ServiceDefinitionToZookeeperRegistration() {
+ }
+
+ @Override
+ public ZookeeperRegistration convert(ServiceDefinition source) {
+ ZookeeperInstance instance = new ZookeeperInstance(
+ source.getId(),
+ source.getName(),
+ source.getMetadata()
+ );
+
+ return ServiceInstanceRegistration.builder()
+ .address(source.getHost())
+ .port(source.getPort())
+ .name(source.getName())
+ .payload(instance)
+ .uriSpec(ZookeeperDiscoveryProperties.DEFAULT_URI_SPEC)
+ .build();
+ }
+}
diff --git a/components/camel-spring-cloud-zookeeper/src/main/resources/META-INF/LICENSE.txt b/components/camel-spring-cloud-zookeeper/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
diff --git a/components/camel-spring-cloud-zookeeper/src/main/resources/META-INF/NOTICE.txt b/components/camel-spring-cloud-zookeeper/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 0000000..2e215bf
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,11 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Camel distribution. ==
+ =========================================================================
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ Please read the different LICENSE files present in the licenses directory of
+ this distribution.
diff --git a/components/camel-spring-cloud/src/main/resources/META-INF/spring.factories b/components/camel-spring-cloud-zookeeper/src/main/resources/META-INF/spring.factories
similarity index 91%
copy from components/camel-spring-cloud/src/main/resources/META-INF/spring.factories
copy to components/camel-spring-cloud-zookeeper/src/main/resources/META-INF/spring.factories
index 9de8f8b..04d8a13 100644
--- a/components/camel-spring-cloud/src/main/resources/META-INF/spring.factories
+++ b/components/camel-spring-cloud-zookeeper/src/main/resources/META-INF/spring.factories
@@ -16,4 +16,4 @@
#
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.spring.cloud.CamelSpringCloudServiceLoadBalancerAutoConfiguration
+ org.apache.camel.spring.cloud.zookeeper.CamelCloudZookeeperAutoConfiguration
\ No newline at end of file
diff --git a/components/camel-spring-cloud-zookeeper/src/test/java/org/apache/camel/spring/cloud/zookeeper/CamelCloudZookeeperAutoConfigurationTest.java b/components/camel-spring-cloud-zookeeper/src/test/java/org/apache/camel/spring/cloud/zookeeper/CamelCloudZookeeperAutoConfigurationTest.java
new file mode 100644
index 0000000..205b5a9
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/src/test/java/org/apache/camel/spring/cloud/zookeeper/CamelCloudZookeeperAutoConfigurationTest.java
@@ -0,0 +1,85 @@
+/**
+ * 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.spring.cloud.zookeeper;
+
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.camel.spring.cloud.zookeeper.support.ZookeeperServer;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
+import org.springframework.boot.WebApplicationType;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.converter.Converter;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class CamelCloudZookeeperAutoConfigurationTest {
+ @Rule
+ public final TestName testName = new TestName();
+ @Rule
+ public final TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+ @Test
+ public void testServiceDefinitionToConsulRegistration() throws Exception {
+ final ZookeeperServer server = new ZookeeperServer(temporaryFolder.newFolder(testName.getMethodName()));
+
+ ConfigurableApplicationContext context = new SpringApplicationBuilder(TestConfiguration.class)
+ .web(WebApplicationType.NONE)
+ .run(
+ "--debug=false",
+ "--spring.main.banner-mode=OFF",
+ "--spring.application.name=" + UUID.randomUUID().toString(),
+ "--ribbon.enabled=false",
+ "--ribbon.eureka.enabled=false",
+ "--management.endpoint.enabled=false",
+ "--spring.cloud.zookeeper.enabled=true",
+ "--spring.cloud.zookeeper.connect-string=" + server.connectString(),
+ "--spring.cloud.zookeeper.config.enabled=false",
+ "--spring.cloud.zookeeper.discovery.enabled=true",
+ "--spring.cloud.service-registry.auto-registration.enabled=false"
+ );
+
+ try {
+ Map<String, Converter> converters = context.getBeansOfType(Converter.class);
+
+ assertThat(converters).isNotNull();
+ assertThat(converters.values().stream().anyMatch(ServiceDefinitionToZookeeperRegistration.class::isInstance)).isTrue();
+ } finally {
+ // shutdown spring context
+ context.close();
+
+ // shutdown zookeeper
+ server.shutdown();
+ }
+ }
+
+ // *************************************
+ // Config
+ // *************************************
+
+ @EnableAutoConfiguration
+ @Configuration
+ public static class TestConfiguration {
+ }
+}
+
diff --git a/components/camel-spring-cloud-zookeeper/src/test/java/org/apache/camel/spring/cloud/zookeeper/CamelCloudZookeeperServiceRegistryTest.java b/components/camel-spring-cloud-zookeeper/src/test/java/org/apache/camel/spring/cloud/zookeeper/CamelCloudZookeeperServiceRegistryTest.java
new file mode 100644
index 0000000..465dcd6
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/src/test/java/org/apache/camel/spring/cloud/zookeeper/CamelCloudZookeeperServiceRegistryTest.java
@@ -0,0 +1,129 @@
+/**
+ * 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.spring.cloud.zookeeper;
+
+import java.util.Collection;
+import java.util.UUID;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.cloud.ServiceRegistry;
+import org.apache.camel.impl.cloud.DefaultServiceDefinition;
+import org.apache.camel.impl.cloud.ServiceRegistrationRoutePolicy;
+import org.apache.camel.spring.cloud.zookeeper.support.ZookeeperServer;
+import org.apache.curator.x.discovery.ServiceDiscovery;
+import org.apache.curator.x.discovery.ServiceInstance;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
+import org.springframework.boot.WebApplicationType;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.cloud.zookeeper.discovery.ZookeeperInstance;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.util.SocketUtils;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class CamelCloudZookeeperServiceRegistryTest {
+ protected final static String SERVICE_ID = UUID.randomUUID().toString();
+ protected final static String SERVICE_NAME = "my-service";
+ protected final static String SERVICE_HOST = "localhost";
+ protected final static int SERVICE_PORT = SocketUtils.findAvailableTcpPort();
+
+ @Rule
+ public final TestName testName = new TestName();
+ @Rule
+ public final TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+ @Test
+ public void testServiceRegistry() throws Exception {
+ final ZookeeperServer server = new ZookeeperServer(temporaryFolder.newFolder(testName.getMethodName()));
+
+ ConfigurableApplicationContext context = new SpringApplicationBuilder(TestConfiguration.class)
+ .web(WebApplicationType.NONE)
+ .run(
+ "--debug=false",
+ "--spring.main.banner-mode=OFF",
+ "--spring.application.name=" + UUID.randomUUID().toString(),
+ "--ribbon.enabled=false",
+ "--ribbon.eureka.enabled=false",
+ "--management.endpoint.enabled=false",
+ "--spring.cloud.zookeeper.enabled=true",
+ "--spring.cloud.zookeeper.connect-string=" + server.connectString(),
+ "--spring.cloud.zookeeper.config.enabled=false",
+ "--spring.cloud.zookeeper.discovery.enabled=true",
+ "--spring.cloud.service-registry.auto-registration.enabled=false"
+ );
+
+ try {
+ final ServiceDiscovery client = context.getBean(ServiceDiscovery.class);
+ final ServiceRegistry registry = context.getBean(ServiceRegistry.class);
+
+ registry.register(
+ DefaultServiceDefinition.builder()
+ .withHost(SERVICE_HOST)
+ .withPort(SERVICE_PORT)
+ .withName(SERVICE_NAME)
+ .withId(SERVICE_ID)
+ .build()
+ );
+
+ Collection<ServiceInstance<ZookeeperInstance>> services = client.queryForInstances(SERVICE_NAME);
+
+ assertThat(services).hasSize(1);
+ assertThat(services).first().hasFieldOrPropertyWithValue("address", SERVICE_HOST);
+ assertThat(services).first().hasFieldOrPropertyWithValue("port", SERVICE_PORT);
+ assertThat(services).first().extracting("payload").first().hasFieldOrPropertyWithValue("id", SERVICE_ID);
+ assertThat(services).first().extracting("payload").first().hasFieldOrPropertyWithValue("name", SERVICE_NAME);
+
+ } finally {
+ // shutdown spring context
+ context.close();
+
+ // shutdown zookeeper
+ server.shutdown();
+ }
+ }
+
+ // *************************************
+ // Config
+ // *************************************
+
+ @EnableAutoConfiguration
+ @Configuration
+ public static class TestConfiguration {
+ @Bean
+ public RouteBuilder routes() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ fromF("jetty:http://0.0.0.0:%d/service/endpoint", SERVICE_PORT)
+ .routeId(SERVICE_ID)
+ .routeGroup(SERVICE_NAME)
+ .routePolicy(new ServiceRegistrationRoutePolicy())
+ .noAutoStartup()
+ .to("log:service-registry?level=INFO");
+ }
+ };
+ }
+ }
+
+}
+
diff --git a/components/camel-spring-cloud-zookeeper/src/test/java/org/apache/camel/spring/cloud/zookeeper/support/ZookeeperServer.java b/components/camel-spring-cloud-zookeeper/src/test/java/org/apache/camel/spring/cloud/zookeeper/support/ZookeeperServer.java
new file mode 100644
index 0000000..628ec34
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/src/test/java/org/apache/camel/spring/cloud/zookeeper/support/ZookeeperServer.java
@@ -0,0 +1,62 @@
+/**
+ * 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.spring.cloud.zookeeper.support;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+
+import org.apache.zookeeper.server.NIOServerCnxnFactory;
+import org.apache.zookeeper.server.ZooKeeperServer;
+import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
+import org.springframework.util.SocketUtils;
+
+public class ZookeeperServer {
+ private NIOServerCnxnFactory connectionFactory;
+ private ZooKeeperServer zkServer;
+
+ public ZookeeperServer(File root) throws IOException, InterruptedException {
+ zkServer = new ZooKeeperServer();
+
+ File dataDir = new File(root, "log");
+ File snapDir = new File(root, "data");
+ FileTxnSnapLog ftxn = new FileTxnSnapLog(dataDir, snapDir);
+
+ zkServer.setTxnLogFactory(ftxn);
+ zkServer.setTickTime(1000);
+
+ connectionFactory = new NIOServerCnxnFactory();
+ connectionFactory.configure(new InetSocketAddress("localhost", SocketUtils.findAvailableTcpPort()), 0);
+ connectionFactory.startup(zkServer);
+ }
+
+ public void shutdown() throws Exception {
+ connectionFactory.shutdown();
+ connectionFactory.join();
+
+ zkServer.shutdown();
+
+ while (zkServer.isRunning()) {
+ zkServer.shutdown();
+ Thread.sleep(100);
+ }
+ }
+
+ public String connectString() {
+ return "localhost:" + connectionFactory.getLocalPort();
+ }
+}
diff --git a/components/camel-spring-cloud-zookeeper/src/test/resources/logback.xml b/components/camel-spring-cloud-zookeeper/src/test/resources/logback.xml
new file mode 100644
index 0000000..1d4cdbe
--- /dev/null
+++ b/components/camel-spring-cloud-zookeeper/src/test/resources/logback.xml
@@ -0,0 +1,43 @@
+<?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.
+
+-->
+<configuration>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%-15.15thread] %-5level %-30.30logger - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%-15.15thread] %-5level %-30.30logger - %msg%n</pattern>
+ </encoder>
+ <file>target/camel-spring-cloud-zookeeper-test.log</file>
+ </appender>
+
+ <root level="INFO">
+ <!--<appender-ref ref="STDOUT"/>-->
+ <!--<appender-ref ref="STDOUT"/>-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</configuration>
\ No newline at end of file
diff --git a/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudDiscoveryClientAutoConfiguration.java b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudDiscoveryClientAutoConfiguration.java
index dec3bc0..d6eb308 100644
--- a/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudDiscoveryClientAutoConfiguration.java
+++ b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudDiscoveryClientAutoConfiguration.java
@@ -39,7 +39,7 @@ import org.springframework.context.annotation.Configuration;
@Conditional(CamelSpringCloudDiscoveryClientAutoConfiguration.LoadBalancerCondition.class)
public class CamelSpringCloudDiscoveryClientAutoConfiguration {
- @Bean(name = "load-balancer-discovery-client")
+ @Bean(name = "service-discovery-client")
@ConditionalOnMissingBean
public DiscoveryClient serviceDiscoveryClient(CamelCloudServiceDiscovery serviceDiscovery) {
return new CamelSpringCloudDiscoveryClient("service-discovery-client", serviceDiscovery);
diff --git a/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceRegistry.java b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceRegistry.java
new file mode 100644
index 0000000..e376e08
--- /dev/null
+++ b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceRegistry.java
@@ -0,0 +1,150 @@
+/**
+ * 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.spring.cloud;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.camel.cloud.ServiceDefinition;
+import org.apache.camel.impl.cloud.AbstractServiceRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.cloud.client.serviceregistry.Registration;
+import org.springframework.cloud.client.serviceregistry.ServiceRegistry;
+import org.springframework.core.convert.ConversionService;
+
+public class CamelSpringCloudServiceRegistry extends AbstractServiceRegistry {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CamelSpringCloudServiceRegistry.class);
+
+ private final List<ServiceDefinition> definitions;
+ private final List<ConversionService> conversionServices;
+ private final ServiceRegistry serviceRegistry;
+ private final Class<? extends Registration> registrationType;
+
+ public CamelSpringCloudServiceRegistry(Collection<ConversionService> conversionServices, ServiceRegistry serviceRegistry) {
+ this.definitions = new ArrayList<>();
+ this.conversionServices = new ArrayList<>(conversionServices);
+ this.serviceRegistry = serviceRegistry;
+ this.registrationType = determineRegistrationType("register");
+ }
+
+ @Override
+ public void register(ServiceDefinition definition) {
+ Registration result = convertServiceDefinition(definition);
+
+ synchronized (this) {
+ LOGGER.debug("Register service with definition: {} with registrations: {}", definition, registrationType);
+
+ serviceRegistry.register(result);
+
+ // keep track of registered definition to remove them upon registry
+ // shutdown
+ if (definitions.stream().noneMatch(d -> matchById(d, definition))) {
+ definitions.add(definition);
+ }
+ }
+ }
+
+ @Override
+ public void deregister(ServiceDefinition definition) {
+ Registration result = convertServiceDefinition(definition);
+
+ synchronized (this) {
+ LOGGER.debug("Deregister service with definition: {} with registrations: {}", definition, registrationType);
+
+ serviceRegistry.deregister(result);
+
+ // remove any instance with the same id
+ definitions.removeIf(d -> matchById(d, definition));
+ }
+ }
+
+ @Override
+ protected void doStart() throws Exception {
+ }
+
+ @Override
+ protected void doStop() throws Exception {
+ // TODO: need to be improved
+ new ArrayList<>(definitions).forEach(this::deregister);
+ }
+
+ public ServiceRegistry getNativeServiceRegistry() {
+ return this.serviceRegistry;
+ }
+
+ public <R extends Registration, T extends ServiceRegistry<R>> T getNativeServiceRegistry(Class<T> type) {
+ return type.cast(this.serviceRegistry);
+ }
+
+ /**
+ * Determine the native registration type. This is needed because the registry
+ * specific implementation provided by spring-cloud-xyz does not handle generic
+ * Registration object but needs a Registration specific to the underlying
+ * technology used.
+ *
+ * @return the registration type
+ */
+ private Class<? extends Registration> determineRegistrationType(String methodName) {
+ Class<? extends Registration> type = null;
+ Method[] methods = serviceRegistry.getClass().getDeclaredMethods();
+
+ for (Method method: methods) {
+ if (!methodName.equals(method.getName())) {
+ continue;
+ }
+
+ if (method.getParameterCount() != 1) {
+ continue;
+ }
+
+ Class<?> parameterType = method.getParameterTypes()[0];
+ if (Registration.class.isAssignableFrom(parameterType)) {
+ if (type == null) {
+ type = (Class<? extends Registration>)parameterType;
+ } else {
+ if (type.isAssignableFrom(parameterType)) {
+ type = (Class<? extends Registration>)parameterType;
+ }
+ }
+ }
+ }
+
+ return type != null ? type : Registration.class;
+ }
+
+ private boolean matchById(ServiceDefinition definition, ServiceDefinition reference) {
+ if (definition.getId() == null || reference.getId() == null) {
+ return false;
+ }
+
+ return Objects.equals(definition.getId(), reference.getId());
+ }
+
+ private Registration convertServiceDefinition(ServiceDefinition definition) {
+ for (ConversionService conversionService: conversionServices) {
+ if (conversionService.canConvert(ServiceDefinition.class, registrationType)) {
+ return conversionService.convert(definition, registrationType);
+ }
+ }
+
+ throw new IllegalStateException("Unable to convert service definition to native registration of type:" + registrationType);
+ }
+}
diff --git a/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudDiscoveryClientAutoConfiguration.java b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceRegistryAutoConfiguration.java
similarity index 51%
copy from components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudDiscoveryClientAutoConfiguration.java
copy to components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceRegistryAutoConfiguration.java
index dec3bc0..caffeaa 100644
--- a/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudDiscoveryClientAutoConfiguration.java
+++ b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceRegistryAutoConfiguration.java
@@ -16,44 +16,45 @@
*/
package org.apache.camel.spring.cloud;
-import org.apache.camel.spring.boot.cloud.CamelCloudAutoConfiguration;
-import org.apache.camel.spring.boot.cloud.CamelCloudConfigurationProperties;
-import org.apache.camel.spring.boot.cloud.CamelCloudServiceDiscovery;
-import org.apache.camel.spring.boot.cloud.CamelCloudServiceDiscoveryAutoConfiguration;
+import java.util.Collection;
+
+import org.apache.camel.cloud.ServiceRegistry;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
import org.apache.camel.spring.boot.util.GroupCondition;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.cloud.client.discovery.DiscoveryClient;
-import org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration;
-import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
+import org.springframework.cloud.client.serviceregistry.ServiceRegistryAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
@Configuration
-@ConditionalOnBean({ CamelCloudAutoConfiguration.class, LoadBalancerClient.class })
-@AutoConfigureAfter({ LoadBalancerAutoConfiguration.class, CamelCloudServiceDiscoveryAutoConfiguration.class })
-@EnableConfigurationProperties(CamelCloudConfigurationProperties.class)
-@Conditional(CamelSpringCloudDiscoveryClientAutoConfiguration.LoadBalancerCondition.class)
-public class CamelSpringCloudDiscoveryClientAutoConfiguration {
+@AutoConfigureAfter(ServiceRegistryAutoConfiguration.class)
+@AutoConfigureBefore(CamelAutoConfiguration.class)
+@ConditionalOnBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class)
+@Conditional(CamelSpringCloudServiceRegistryAutoConfiguration.ServiceRegistryCondition.class)
+public class CamelSpringCloudServiceRegistryAutoConfiguration {
- @Bean(name = "load-balancer-discovery-client")
+ @Bean
@ConditionalOnMissingBean
- public DiscoveryClient serviceDiscoveryClient(CamelCloudServiceDiscovery serviceDiscovery) {
- return new CamelSpringCloudDiscoveryClient("service-discovery-client", serviceDiscovery);
+ public ServiceRegistry camelServiceRegistry(
+ Collection<org.springframework.core.convert.ConversionService> conversionServices,
+ org.springframework.cloud.client.serviceregistry.ServiceRegistry serviceRegistry) {
+
+ return new CamelSpringCloudServiceRegistry(conversionServices, serviceRegistry);
}
// *******************************
// Condition
// *******************************
- public static class LoadBalancerCondition extends GroupCondition {
- public LoadBalancerCondition() {
+ public static class ServiceRegistryCondition extends GroupCondition {
+ public ServiceRegistryCondition() {
super(
"camel.cloud",
- "camel.cloud.discovery-client"
+ "camel.cloud.service-registry"
);
}
}
diff --git a/components/camel-spring-cloud/src/main/resources/META-INF/spring.factories b/components/camel-spring-cloud/src/main/resources/META-INF/spring.factories
index 9de8f8b..ae6d075 100644
--- a/components/camel-spring-cloud/src/main/resources/META-INF/spring.factories
+++ b/components/camel-spring-cloud/src/main/resources/META-INF/spring.factories
@@ -16,4 +16,6 @@
#
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.spring.cloud.CamelSpringCloudServiceLoadBalancerAutoConfiguration
+ org.apache.camel.spring.cloud.CamelSpringCloudDiscoveryClientAutoConfiguration,\
+ org.apache.camel.spring.cloud.CamelSpringCloudServiceLoadBalancerAutoConfiguration,\
+ org.apache.camel.spring.cloud.CamelSpringCloudServiceRegistryAutoConfiguration
diff --git a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceCallRibbonTest.java b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceCallRibbonTest.java
index 708f04f..00d1696 100644
--- a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceCallRibbonTest.java
+++ b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceCallRibbonTest.java
@@ -42,10 +42,10 @@ import org.springframework.test.context.junit4.SpringRunner;
CamelSpringCloudServiceCallRibbonTest.TestConfiguration.class
},
properties = {
+ "spring.main.banner-mode=off",
"ribbon.eureka.enabled=false",
"ribbon.listOfServers=localhost:9090,localhost:9092",
- "ribbon.ServerListRefreshInterval=15000",
- "debug=false"
+ "ribbon.ServerListRefreshInterval=15000"
}
)
public class CamelSpringCloudServiceCallRibbonTest {
@@ -71,7 +71,8 @@ public class CamelSpringCloudServiceCallRibbonTest {
public void configure() throws Exception {
from("direct:start")
.serviceCall()
- .name("custom-svc-list/hello");
+ .name("custom-svc-list/hello")
+ .end();
from("jetty:http://localhost:9090/hello")
.transform()
diff --git a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceRegistryTest.java b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceRegistryTest.java
new file mode 100644
index 0000000..f62843d
--- /dev/null
+++ b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelSpringCloudServiceRegistryTest.java
@@ -0,0 +1,271 @@
+package org.apache.camel.spring.cloud;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.ThreadLocalRandom;
+
+import org.apache.camel.cloud.ServiceDefinition;
+import org.apache.camel.impl.cloud.DefaultServiceDefinition;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.cloud.CamelCloudAutoConfiguration;
+import org.junit.Test;
+import org.springframework.boot.autoconfigure.AutoConfigurations;
+import org.springframework.boot.test.context.runner.ApplicationContextRunner;
+import org.springframework.cloud.client.DefaultServiceInstance;
+import org.springframework.cloud.client.serviceregistry.Registration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.converter.Converter;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class CamelSpringCloudServiceRegistryTest {
+
+ // *************************************
+ // Test Auto Configuration
+ // *************************************
+
+ @Test
+ public void testAutoConfiguration() {
+ new ApplicationContextRunner()
+ .withConfiguration(
+ AutoConfigurations.of(
+ CamelAutoConfiguration.class,
+ CamelCloudAutoConfiguration.class,
+ CamelSpringCloudServiceRegistryAutoConfiguration.class
+ ))
+ .withUserConfiguration(
+ TestConfiguration.class)
+ .withPropertyValues(
+ "spring.main.banner-mode=off",
+ "ribbon.eureka.enabled=false",
+ "ribbon.enabled=false")
+ .run(
+ context -> {
+ // spring cloud registry
+ assertThat(context).hasSingleBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class);
+ assertThat(context).getBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class).isInstanceOf(MyServiceRegistry.class);
+
+ // camel registry
+ assertThat(context).hasSingleBean(org.apache.camel.cloud.ServiceRegistry.class);
+ assertThat(context).getBean(org.apache.camel.cloud.ServiceRegistry.class).isInstanceOf(CamelSpringCloudServiceRegistry.class);
+
+ assertThat(context).getBean(org.apache.camel.cloud.ServiceRegistry.class).hasFieldOrPropertyWithValue(
+ "nativeServiceRegistry",
+ context.getBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class)
+ );
+ }
+ );
+ }
+
+ @Test
+ public void testDisabledCamelCloud() {
+ new ApplicationContextRunner()
+ .withConfiguration(
+ AutoConfigurations.of(
+ CamelAutoConfiguration.class,
+ CamelCloudAutoConfiguration.class,
+ CamelSpringCloudServiceRegistryAutoConfiguration.class
+ ))
+ .withUserConfiguration(
+ TestConfiguration.class)
+ .withPropertyValues(
+ "spring.main.banner-mode=off",
+ "ribbon.eureka.enabled=false",
+ "ribbon.enabled=false",
+ "camel.cloud.enabled=false")
+ .run(
+ context -> {
+ // spring cloud registry
+ assertThat(context).hasSingleBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class);
+ assertThat(context).getBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class).isInstanceOf(MyServiceRegistry.class);
+
+ // camel registry
+ assertThat(context).doesNotHaveBean(org.apache.camel.cloud.ServiceRegistry.class);
+ }
+ );
+ }
+
+ @Test
+ public void testDisabledCamelServiceRegistry() {
+ new ApplicationContextRunner()
+ .withConfiguration(
+ AutoConfigurations.of(
+ CamelAutoConfiguration.class,
+ CamelCloudAutoConfiguration.class,
+ CamelSpringCloudServiceRegistryAutoConfiguration.class
+ ))
+ .withUserConfiguration(
+ TestConfiguration.class)
+ .withPropertyValues(
+ "spring.main.banner-mode=off",
+ "ribbon.eureka.enabled=false",
+ "ribbon.enabled=false",
+ "camel.cloud.enabled=true",
+ "camel.cloud.service-registry.enabled=false")
+ .run(
+ context -> {
+ // spring cloud registry
+ assertThat(context).hasSingleBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class);
+ assertThat(context).getBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class).isInstanceOf(MyServiceRegistry.class);
+
+ // camel registry
+ assertThat(context).doesNotHaveBean(org.apache.camel.cloud.ServiceRegistry.class);
+ }
+ );
+ }
+
+ @Test
+ public void testEnabledCamelServiceRegistry() {
+ new ApplicationContextRunner()
+ .withConfiguration(
+ AutoConfigurations.of(
+ CamelAutoConfiguration.class,
+ CamelCloudAutoConfiguration.class,
+ CamelSpringCloudServiceRegistryAutoConfiguration.class
+ ))
+ .withUserConfiguration(
+ TestConfiguration.class)
+ .withPropertyValues(
+ "spring.main.banner-mode=off",
+ "ribbon.eureka.enabled=false",
+ "ribbon.enabled=false",
+ "camel.cloud.enabled=false",
+ "camel.cloud.service-registry.enabled=true")
+ .run(
+ context -> {
+ // spring cloud registry
+ assertThat(context).hasSingleBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class);
+ assertThat(context).getBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class).isInstanceOf(MyServiceRegistry.class);
+
+ // camel registry
+ assertThat(context).hasSingleBean(org.apache.camel.cloud.ServiceRegistry.class);
+ assertThat(context).getBean(org.apache.camel.cloud.ServiceRegistry.class).isInstanceOf(CamelSpringCloudServiceRegistry.class);
+
+ assertThat(context).getBean(org.apache.camel.cloud.ServiceRegistry.class).hasFieldOrPropertyWithValue(
+ "nativeServiceRegistry",
+ context.getBean(org.springframework.cloud.client.serviceregistry.ServiceRegistry.class)
+ );
+ }
+ );
+ }
+
+ // *************************************
+ // Test Registry
+ // *************************************
+
+ @Test
+ public void testServiceRegistry() {
+ new ApplicationContextRunner()
+ .withConfiguration(
+ AutoConfigurations.of(
+ CamelAutoConfiguration.class,
+ CamelCloudAutoConfiguration.class,
+ CamelSpringCloudServiceRegistryAutoConfiguration.class
+ ))
+ .withUserConfiguration(
+ TestConfiguration.class)
+ .withPropertyValues(
+ "spring.main.banner-mode=off",
+ "ribbon.eureka.enabled=false",
+ "ribbon.enabled=false")
+ .run(
+ context -> {
+ CamelSpringCloudServiceRegistry camelRgistry = context.getBean(CamelSpringCloudServiceRegistry.class);
+
+ final String serviceName = "my-.service";
+ final String serviceId = UUID.randomUUID().toString();
+ final int port = ThreadLocalRandom.current().nextInt();
+
+ camelRgistry.register(
+ DefaultServiceDefinition.builder()
+ .withHost("localhost")
+ .withPort(port)
+ .withName(serviceName)
+ .withId(serviceId)
+ .build()
+ );
+
+ MyServiceRegistry cloudRegistry = camelRgistry.getNativeServiceRegistry(MyServiceRegistry.class);
+
+ assertThat(cloudRegistry.registrations).hasSize(1);
+ assertThat(cloudRegistry.registrations.get(0)).hasFieldOrPropertyWithValue("serviceId", serviceName);
+ assertThat(cloudRegistry.registrations.get(0)).hasFieldOrPropertyWithValue("host", "localhost");
+ assertThat(cloudRegistry.registrations.get(0)).hasFieldOrPropertyWithValue("port", port);
+
+ }
+ );
+ }
+
+ // *************************************
+ // Config
+ // *************************************
+
+ @Configuration
+ public static class TestConfiguration {
+ @Bean
+ public org.springframework.cloud.client.serviceregistry.ServiceRegistry<MyServiceRegistration> myServiceRegistry() {
+ return new MyServiceRegistry();
+ }
+
+ @Bean
+ public Converter<ServiceDefinition, MyServiceRegistration> definitionToRegistration() {
+ return new Converter<ServiceDefinition, MyServiceRegistration>() {
+ @Override
+ public MyServiceRegistration convert(ServiceDefinition source) {
+ return new MyServiceRegistration(
+ source.getName(),
+ source.getHost(),
+ source.getPort()
+ );
+ }
+ };
+ }
+
+ }
+
+ // *************************************
+ // Service Registry Impl
+ // *************************************
+
+ public static class MyServiceRegistry implements org.springframework.cloud.client.serviceregistry.ServiceRegistry<MyServiceRegistration> {
+ List<MyServiceRegistration> registrations;
+
+ public MyServiceRegistry() {
+ this.registrations = new ArrayList<>();
+ }
+
+ @Override
+ public void register(MyServiceRegistration registration) {
+ this.registrations.add(registration);
+ }
+
+ @Override
+ public void deregister(MyServiceRegistration registration) {
+ this.registrations.remove(registration);
+ }
+
+ @Override
+ public void close() {
+ this.registrations.clear();
+ }
+
+ @Override
+ public void setStatus(MyServiceRegistration registration, String status) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Object getStatus(MyServiceRegistration registration) {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ public static class MyServiceRegistration extends DefaultServiceInstance implements Registration {
+ public MyServiceRegistration(String serviceId, String host, int port) {
+ super(serviceId, host, port, false, Collections.emptyMap());
+ }
+ }
+}
diff --git a/components/pom.xml b/components/pom.xml
index f52a668..9e35306 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -280,7 +280,9 @@
<module>camel-spring-batch</module>
<module>camel-spring-boot</module>
<module>camel-spring-cloud</module>
+ <module>camel-spring-cloud-consul</module>
<module>camel-spring-cloud-netflix</module>
+ <module>camel-spring-cloud-zookeeper</module>
<module>camel-spring-javaconfig</module>
<module>camel-spring-integration</module>
<module>camel-spring-ldap</module>
diff --git a/components/readme.adoc b/components/readme.adoc
index d79a3e1..8d9bd00 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -2,7 +2,7 @@ Components
^^^^^^^^^^
// components: START
-Number of Components: 294 in 201 JAR artifacts (20 deprecated)
+Number of Components: 295 in 202 JAR artifacts (20 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
@@ -1075,7 +1075,7 @@ Miscellaneous Components
^^^^^^^^^^^^^^^^^^^^^^^^
// others: START
-Number of Miscellaneous Components: 41 in 41 JAR artifacts (13 deprecated)
+Number of Miscellaneous Components: 43 in 43 JAR artifacts (13 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
@@ -1135,8 +1135,12 @@ Number of Miscellaneous Components: 41 in 41 JAR artifacts (13 deprecated)
| link:camel-spring-cloud/src/main/docs/spring-cloud.adoc[Spring Cloud] (camel-spring-cloud) | 2.19 | Camel Cloud integration with Spring Cloud
+| link:camel-spring-cloud-consul/src/main/docs/spring-cloud-consul.adoc[Spring Cloud Consul] (camel-spring-cloud-consul) | 2.19 | Camel Cloud integration with Spring Cloud Consul
+
| link:camel-spring-cloud-netflix/src/main/docs/spring-cloud-netflix.adoc[Spring Cloud Netflix] (camel-spring-cloud-netflix) | 2.19 | Camel Cloud integration with Spring Cloud Netflix
+| link:camel-spring-cloud-zookeeper/src/main/docs/spring-cloud-zookeeper.adoc[Spring Cloud Zookeeper] (camel-spring-cloud-zookeeper) | 2.19 | Camel Cloud integration with Spring Cloud Zookeeper
+
| link:camel-spring-javaconfig/src/main/docs/spring-javaconfig.adoc[Spring Java Configuration] (camel-spring-javaconfig) | 2.0 | Using Camel with Spring Java Configuration
| link:camel-spring-security/src/main/docs/spring-security.adoc[Spring Security] (camel-spring-security) | 2.3 | Security using Spring Security
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 0d7ce31..9aebcfb 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -426,7 +426,9 @@
* [Shiro](shiro.adoc)
* [Spring Boot](spring-boot.adoc)
* [Spring Cloud](spring-cloud.adoc)
+ * [Spring Cloud Consul](spring-cloud-consul.adoc)
* [Spring Cloud Netflix](spring-cloud-netflix.adoc)
+ * [Spring Cloud Zookeeper](spring-cloud-zookeeper.adoc)
* [Spring Java Configuration](spring-javaconfig.adoc)
* [Spring Security](spring-security.adoc)
* [Swagger](swagger.adoc)
diff --git a/parent/pom.xml b/parent/pom.xml
index 0d56081..ea6207f 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -637,7 +637,9 @@
<spring-batch-bundle-version>4.0.1.RELEASE_1</spring-batch-bundle-version>
<spring-boot-version>2.0.2.RELEASE</spring-boot-version>
<spring-cloud-commons-version>1.3.3.RELEASE</spring-cloud-commons-version>
+ <spring-cloud-consul-version>1.3.3.RELEASE</spring-cloud-consul-version>
<spring-cloud-netflix-version>1.4.4.RELEASE</spring-cloud-netflix-version>
+ <spring-cloud-zookeeper-version>1.2.1.RELEASE</spring-cloud-zookeeper-version>
<spring-castor-bundle-version>1.2.0</spring-castor-bundle-version>
<spring-data-commons-version>2.0.5.RELEASE</spring-data-commons-version>
<spring-data-keyvalue-version>2.0.5.RELEASE</spring-data-keyvalue-version>
@@ -2014,11 +2016,21 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-consul</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-cloud-netflix</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-zookeeper</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-integration</artifactId>
<version>${project.version}</version>
</dependency>
@@ -3448,11 +3460,21 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-consul-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-cloud-netflix-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-zookeeper-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-integration-starter</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/pom.xml b/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/pom.xml
new file mode 100644
index 0000000..040625a
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/pom.xml
@@ -0,0 +1,65 @@
+<?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</groupId>
+ <artifactId>components-starter</artifactId>
+ <version>2.22.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>camel-spring-cloud-consul-starter</artifactId>
+ <packaging>jar</packaging>
+ <name>Spring-Boot Starter :: Camel :: Spring Cloud Consul</name>
+ <description>Spring-Boot Starter for Camel Cloud integration with Spring Cloud Consul</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <version>${spring-boot-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-consul</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--START OF GENERATED CODE-->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core-starter</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-boot-starter</artifactId>
+ </dependency>
+ <!--END OF GENERATED CODE-->
+ </dependencies>
+ <!--START OF GENERATED CODE-->
+ <repositories>
+ <repository>
+ <id>spring-milestones</id>
+ <name>Spring Milestones</name>
+ <url>https://repo.spring.io/libs-milestone</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <!--END OF GENERATED CODE-->
+</project>
diff --git a/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/src/main/resources/META-INF/LICENSE.txt b/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
diff --git a/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/src/main/resources/META-INF/NOTICE.txt b/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 0000000..2e215bf
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,11 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Camel distribution. ==
+ =========================================================================
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ Please read the different LICENSE files present in the licenses directory of
+ this distribution.
diff --git a/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/src/main/resources/META-INF/spring.provides b/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/src/main/resources/META-INF/spring.provides
new file mode 100644
index 0000000..c50ba53
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-spring-cloud-consul-starter/src/main/resources/META-INF/spring.provides
@@ -0,0 +1,17 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+provides: camel-spring-cloud-consul
diff --git a/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/pom.xml b/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/pom.xml
new file mode 100644
index 0000000..cd5975e
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/pom.xml
@@ -0,0 +1,65 @@
+<?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</groupId>
+ <artifactId>components-starter</artifactId>
+ <version>2.22.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>camel-spring-cloud-zookeeper-starter</artifactId>
+ <packaging>jar</packaging>
+ <name>Spring-Boot Starter :: Camel :: Spring Cloud Zookeeper</name>
+ <description>Spring-Boot Starter for Camel Cloud integration with Spring Cloud Zookeeper</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <version>${spring-boot-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-zookeeper</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--START OF GENERATED CODE-->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core-starter</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-boot-starter</artifactId>
+ </dependency>
+ <!--END OF GENERATED CODE-->
+ </dependencies>
+ <!--START OF GENERATED CODE-->
+ <repositories>
+ <repository>
+ <id>spring-milestones</id>
+ <name>Spring Milestones</name>
+ <url>https://repo.spring.io/libs-milestone</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <!--END OF GENERATED CODE-->
+</project>
diff --git a/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/src/main/resources/META-INF/LICENSE.txt b/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
diff --git a/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/src/main/resources/META-INF/NOTICE.txt b/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 0000000..2e215bf
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,11 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Camel distribution. ==
+ =========================================================================
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ Please read the different LICENSE files present in the licenses directory of
+ this distribution.
diff --git a/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/src/main/resources/META-INF/spring.provides b/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/src/main/resources/META-INF/spring.provides
new file mode 100644
index 0000000..64db25d
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-spring-cloud-zookeeper-starter/src/main/resources/META-INF/spring.provides
@@ -0,0 +1,17 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+provides: camel-spring-cloud-zookeeper
diff --git a/platforms/spring-boot/components-starter/pom.xml b/platforms/spring-boot/components-starter/pom.xml
index f075189..9d8cc35 100644
--- a/platforms/spring-boot/components-starter/pom.xml
+++ b/platforms/spring-boot/components-starter/pom.xml
@@ -292,8 +292,10 @@
<module>camel-splunk-starter</module>
<module>camel-spring-batch-starter</module>
<module>camel-spring-boot-starter</module>
+ <module>camel-spring-cloud-consul-starter</module>
<module>camel-spring-cloud-netflix-starter</module>
<module>camel-spring-cloud-starter</module>
+ <module>camel-spring-cloud-zookeeper-starter</module>
<module>camel-spring-integration-starter</module>
<module>camel-spring-javaconfig-starter</module>
<module>camel-spring-ldap-starter</module>
diff --git a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
index 8f335eb..090c6ad 100644
--- a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
+++ b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
@@ -2581,6 +2581,16 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-consul</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-consul-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-cloud-netflix</artifactId>
<version>${project.version}</version>
</dependency>
@@ -2596,6 +2606,16 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-zookeeper</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-cloud-zookeeper-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-integration</artifactId>
<version>${project.version}</version>
</dependency>
--
To stop receiving notification emails like this one, please contact
lburgazzoli@apache.org.