This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 38f9df5de0c455bb94fa4a68fa1e653bd8bea8b9 Author: Claus Ibsen <[email protected]> AuthorDate: Fri Apr 16 09:17:25 2021 +0200 CAMEL-16520: camel-spring-boot - Auto configuration options for cloud and cluster should not clash with component --- .../src/main/docs/consul-starter.adoc | 120 ++++++++++----------- .../ConsulServiceRegistryAutoConfiguration.java | 2 +- .../cloud/ConsulServiceRegistryConfiguration.java | 2 +- .../ConsulClusterServiceAutoConfiguration.java | 2 +- .../cluster/ConsulClusterServiceConfiguration.java | 2 +- 5 files changed, 64 insertions(+), 64 deletions(-) diff --git a/components-starter/camel-consul-starter/src/main/docs/consul-starter.adoc b/components-starter/camel-consul-starter/src/main/docs/consul-starter.adoc index e92cdcc..af4faeb 100644 --- a/components-starter/camel-consul-starter/src/main/docs/consul-starter.adoc +++ b/components-starter/camel-consul-starter/src/main/docs/consul-starter.adoc @@ -24,39 +24,69 @@ The component supports 90 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type +| *camel.cloud.consul.service-registry.acl-token* | Sets the ACL token to be used with Consul | | String +| *camel.cloud.consul.service-registry.attributes* | Custom service attributes. | | Map +| *camel.cloud.consul.service-registry.block-seconds* | The time (in seconds) to wait for a watch event, default 10 seconds | 10 | Integer +| *camel.cloud.consul.service-registry.check-interval* | How often (in seconds) a service has to be marked as healthy if its check is TTL or how often the check should run. Default is 5 seconds. | 5 | Integer +| *camel.cloud.consul.service-registry.check-ttl* | The time (in seconds) to live for TTL checks. Default is 1 minute. | 60 | Integer +| *camel.cloud.consul.service-registry.connect-timeout* | Connect timeout for OkHttpClient | | Duration +| *camel.cloud.consul.service-registry.connect-timeout-millis* | Use connectTimeout instead | | Long +| *camel.cloud.consul.service-registry.consistency-mode* | The consistencyMode used for queries, default ConsistencyMode.DEFAULT | | ConsistencyMode +| *camel.cloud.consul.service-registry.datacenter* | The data center | | String +| *camel.cloud.consul.service-registry.deregister-after* | How long (in seconds) to wait to deregister a service in case of unclean shutdown. Default is 1 hour. | 3600 | Integer +| *camel.cloud.consul.service-registry.deregister-services-on-stop* | Should we remove all the registered services know by this registry on stop? | true | Boolean +| *camel.cloud.consul.service-registry.enabled* | Sets if the consul service registry should be enabled or not, default is false. | false | Boolean +| *camel.cloud.consul.service-registry.first-index* | The first index for watch for, default 0 | 0 | BigInteger +| *camel.cloud.consul.service-registry.id* | Service Registry ID | | String +| *camel.cloud.consul.service-registry.near-node* | The near node to use for queries. | | String +| *camel.cloud.consul.service-registry.node-meta* | The note meta-data to use for queries. | | List +| *camel.cloud.consul.service-registry.order* | Service lookup order/priority. | | Integer +| *camel.cloud.consul.service-registry.override-service-host* | Should we override the service host if given ? | true | Boolean +| *camel.cloud.consul.service-registry.password* | Sets the password to be used for basic authentication | | String +| *camel.cloud.consul.service-registry.ping-instance* | Configure if the AgentClient should attempt a ping before returning the Consul instance | true | Boolean +| *camel.cloud.consul.service-registry.read-timeout* | Read timeout for OkHttpClient | | Duration +| *camel.cloud.consul.service-registry.read-timeout-millis* | Use readTimeout instead. | | Long +| *camel.cloud.consul.service-registry.recursive* | Recursively watch, default false | false | Boolean +| *camel.cloud.consul.service-registry.service-host* | Service host. | | String +| *camel.cloud.consul.service-registry.ssl-context-parameters* | SSL configuration using an org.apache.camel.support.jsse.SSLContextParameters instance. | | SSLContextParameters +| *camel.cloud.consul.service-registry.tags* | Set tags. You can separate multiple tags by comma. | | Set +| *camel.cloud.consul.service-registry.url* | The Consul agent URL | | String +| *camel.cloud.consul.service-registry.user-name* | Sets the username to be used for basic authentication | | String +| *camel.cloud.consul.service-registry.write-timeout* | Write timeout for OkHttpClient | | Duration +| *camel.cloud.consul.service-registry.write-timeout-millis* | Use writeTimeout instead. | | Long +| *camel.cluster.consul.acl-token* | Sets the ACL token to be used with Consul | | String +| *camel.cluster.consul.attributes* | Custom service attributes. | | Map +| *camel.cluster.consul.block-seconds* | The time (in seconds) to wait for a watch event, default 10 seconds | 10 | Integer +| *camel.cluster.consul.connect-timeout* | Connect timeout for OkHttpClient | | Duration +| *camel.cluster.consul.connect-timeout-millis* | Use connectTimeout instead | | Long +| *camel.cluster.consul.consistency-mode* | The consistencyMode used for queries, default ConsistencyMode.DEFAULT | | ConsistencyMode +| *camel.cluster.consul.datacenter* | The data center | | String +| *camel.cluster.consul.enabled* | Sets if the consul cluster service should be enabled or not, default is false. | false | Boolean +| *camel.cluster.consul.first-index* | The first index for watch for, default 0 | 0 | BigInteger +| *camel.cluster.consul.id* | Cluster Service ID | | String +| *camel.cluster.consul.near-node* | The near node to use for queries. | | String +| *camel.cluster.consul.node-meta* | The note meta-data to use for queries. | | List +| *camel.cluster.consul.order* | Service lookup order/priority. | | Integer +| *camel.cluster.consul.password* | Sets the password to be used for basic authentication | | String +| *camel.cluster.consul.ping-instance* | Configure if the AgentClient should attempt a ping before returning the Consul instance | true | Boolean +| *camel.cluster.consul.read-timeout* | Read timeout for OkHttpClient | | Duration +| *camel.cluster.consul.read-timeout-millis* | Use readTimeout instead. | | Long +| *camel.cluster.consul.recursive* | Recursively watch, default false | false | Boolean +| *camel.cluster.consul.root-path* | Consul root path | /camel | String +| *camel.cluster.consul.session-lock-delay* | The value for lockDelay | 5 | Integer +| *camel.cluster.consul.session-refresh-interval* | The value of wait attribute | 5 | Integer +| *camel.cluster.consul.session-ttl* | The value of TTL | 60 | Integer +| *camel.cluster.consul.ssl-context-parameters* | SSL configuration using an org.apache.camel.support.jsse.SSLContextParameters instance. | | SSLContextParameters +| *camel.cluster.consul.tags* | Set tags. You can separate multiple tags by comma. | | Set +| *camel.cluster.consul.url* | The Consul agent URL | | String +| *camel.cluster.consul.user-name* | Sets the username to be used for basic authentication | | String +| *camel.cluster.consul.write-timeout* | Write timeout for OkHttpClient | | Duration +| *camel.cluster.consul.write-timeout-millis* | Use writeTimeout instead. | | Long | *camel.component.consul.acl-token* | Sets the ACL token to be used with Consul | | String | *camel.component.consul.action* | The default action. Can be overridden by CamelConsulAction | | String | *camel.component.consul.autowired-enabled* | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean | *camel.component.consul.block-seconds* | The second to wait for a watch event, default 10 seconds | 10 | Integer | *camel.component.consul.bridge-error-handler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean -| *camel.component.consul.cluster.service.acl-token* | Sets the ACL token to be used with Consul | | String -| *camel.component.consul.cluster.service.attributes* | Custom service attributes. | | Map -| *camel.component.consul.cluster.service.block-seconds* | The time (in seconds) to wait for a watch event, default 10 seconds | 10 | Integer -| *camel.component.consul.cluster.service.connect-timeout* | Connect timeout for OkHttpClient | | Duration -| *camel.component.consul.cluster.service.connect-timeout-millis* | Use connectTimeout instead | | Long -| *camel.component.consul.cluster.service.consistency-mode* | The consistencyMode used for queries, default ConsistencyMode.DEFAULT | | ConsistencyMode -| *camel.component.consul.cluster.service.datacenter* | The data center | | String -| *camel.component.consul.cluster.service.enabled* | Sets if the consul cluster service should be enabled or not, default is false. | false | Boolean -| *camel.component.consul.cluster.service.first-index* | The first index for watch for, default 0 | 0 | BigInteger -| *camel.component.consul.cluster.service.id* | Cluster Service ID | | String -| *camel.component.consul.cluster.service.near-node* | The near node to use for queries. | | String -| *camel.component.consul.cluster.service.node-meta* | The note meta-data to use for queries. | | List -| *camel.component.consul.cluster.service.order* | Service lookup order/priority. | | Integer -| *camel.component.consul.cluster.service.password* | Sets the password to be used for basic authentication | | String -| *camel.component.consul.cluster.service.ping-instance* | Configure if the AgentClient should attempt a ping before returning the Consul instance | true | Boolean -| *camel.component.consul.cluster.service.read-timeout* | Read timeout for OkHttpClient | | Duration -| *camel.component.consul.cluster.service.read-timeout-millis* | Use readTimeout instead. | | Long -| *camel.component.consul.cluster.service.recursive* | Recursively watch, default false | false | Boolean -| *camel.component.consul.cluster.service.root-path* | Consul root path | /camel | String -| *camel.component.consul.cluster.service.session-lock-delay* | The value for lockDelay | 5 | Integer -| *camel.component.consul.cluster.service.session-refresh-interval* | The value of wait attribute | 5 | Integer -| *camel.component.consul.cluster.service.session-ttl* | The value of TTL | 60 | Integer -| *camel.component.consul.cluster.service.ssl-context-parameters* | SSL configuration using an org.apache.camel.support.jsse.SSLContextParameters instance. | | SSLContextParameters -| *camel.component.consul.cluster.service.tags* | Set tags. You can separate multiple tags by comma. | | Set -| *camel.component.consul.cluster.service.url* | The Consul agent URL | | String -| *camel.component.consul.cluster.service.user-name* | Sets the username to be used for basic authentication | | String -| *camel.component.consul.cluster.service.write-timeout* | Write timeout for OkHttpClient | | Duration -| *camel.component.consul.cluster.service.write-timeout-millis* | Use writeTimeout instead. | | Long | *camel.component.consul.configuration* | Consul configuration. The option is a org.apache.camel.component.consul.ConsulConfiguration type. | | ConsulConfiguration | *camel.component.consul.connect-timeout* | Connect timeout for OkHttpClient. The option is a java.time.Duration type. | | Duration | *camel.component.consul.consistency-mode* | The consistencyMode used for queries, default ConsistencyMode.DEFAULT | | ConsistencyMode @@ -72,36 +102,6 @@ The component supports 90 options, which are listed below. | *camel.component.consul.ping-instance* | Configure if the AgentClient should attempt a ping before returning the Consul instance | true | Boolean | *camel.component.consul.read-timeout* | Read timeout for OkHttpClient. The option is a java.time.Duration type. | | Duration | *camel.component.consul.recursive* | Recursively watch, default false | false | Boolean -| *camel.component.consul.service-registry.acl-token* | Sets the ACL token to be used with Consul | | String -| *camel.component.consul.service-registry.attributes* | Custom service attributes. | | Map -| *camel.component.consul.service-registry.block-seconds* | The time (in seconds) to wait for a watch event, default 10 seconds | 10 | Integer -| *camel.component.consul.service-registry.check-interval* | How often (in seconds) a service has to be marked as healthy if its check is TTL or how often the check should run. Default is 5 seconds. | 5 | Integer -| *camel.component.consul.service-registry.check-ttl* | The time (in seconds) to live for TTL checks. Default is 1 minute. | 60 | Integer -| *camel.component.consul.service-registry.connect-timeout* | Connect timeout for OkHttpClient | | Duration -| *camel.component.consul.service-registry.connect-timeout-millis* | Use connectTimeout instead | | Long -| *camel.component.consul.service-registry.consistency-mode* | The consistencyMode used for queries, default ConsistencyMode.DEFAULT | | ConsistencyMode -| *camel.component.consul.service-registry.datacenter* | The data center | | String -| *camel.component.consul.service-registry.deregister-after* | How long (in seconds) to wait to deregister a service in case of unclean shutdown. Default is 1 hour. | 3600 | Integer -| *camel.component.consul.service-registry.deregister-services-on-stop* | Should we remove all the registered services know by this registry on stop? | true | Boolean -| *camel.component.consul.service-registry.enabled* | Sets if the consul service registry should be enabled or not, default is false. | false | Boolean -| *camel.component.consul.service-registry.first-index* | The first index for watch for, default 0 | 0 | BigInteger -| *camel.component.consul.service-registry.id* | Service Registry ID | | String -| *camel.component.consul.service-registry.near-node* | The near node to use for queries. | | String -| *camel.component.consul.service-registry.node-meta* | The note meta-data to use for queries. | | List -| *camel.component.consul.service-registry.order* | Service lookup order/priority. | | Integer -| *camel.component.consul.service-registry.override-service-host* | Should we override the service host if given ? | true | Boolean -| *camel.component.consul.service-registry.password* | Sets the password to be used for basic authentication | | String -| *camel.component.consul.service-registry.ping-instance* | Configure if the AgentClient should attempt a ping before returning the Consul instance | true | Boolean -| *camel.component.consul.service-registry.read-timeout* | Read timeout for OkHttpClient | | Duration -| *camel.component.consul.service-registry.read-timeout-millis* | Use readTimeout instead. | | Long -| *camel.component.consul.service-registry.recursive* | Recursively watch, default false | false | Boolean -| *camel.component.consul.service-registry.service-host* | Service host. | | String -| *camel.component.consul.service-registry.ssl-context-parameters* | SSL configuration using an org.apache.camel.support.jsse.SSLContextParameters instance. | | SSLContextParameters -| *camel.component.consul.service-registry.tags* | Set tags. You can separate multiple tags by comma. | | Set -| *camel.component.consul.service-registry.url* | The Consul agent URL | | String -| *camel.component.consul.service-registry.user-name* | Sets the username to be used for basic authentication | | String -| *camel.component.consul.service-registry.write-timeout* | Write timeout for OkHttpClient | | Duration -| *camel.component.consul.service-registry.write-timeout-millis* | Use writeTimeout instead. | | Long | *camel.component.consul.ssl-context-parameters* | SSL configuration using an org.apache.camel.support.jsse.SSLContextParameters instance. The option is a org.apache.camel.support.jsse.SSLContextParameters type. | | SSLContextParameters | *camel.component.consul.tags* | Set tags. You can separate multiple tags by comma. | | String | *camel.component.consul.url* | The Consul agent URL | | String @@ -109,10 +109,10 @@ The component supports 90 options, which are listed below. | *camel.component.consul.user-name* | Sets the username to be used for basic authentication | | String | *camel.component.consul.value-as-string* | Default to transform values retrieved from Consul i.e. on KV endpoint to string. | false | Boolean | *camel.component.consul.write-timeout* | Write timeout for OkHttpClient. The option is a java.time.Duration type. | | Duration -| *camel.component.consul.cluster.service.dc* | *Deprecated* Use datacenter instead | | String +| *camel.cloud.consul.service-registry.dc* | *Deprecated* Use datacenter instead | | String +| *camel.cluster.consul.dc* | *Deprecated* Use datacenter instead | | String | *camel.component.consul.connect-timeout-millis* | *Deprecated* Connect timeout for OkHttpClient. Deprecation note: Use connectTimeout instead | | Long | *camel.component.consul.read-timeout-millis* | *Deprecated* Read timeout for OkHttpClient. Deprecation note: Use readTimeout instead | | Long -| *camel.component.consul.service-registry.dc* | *Deprecated* Use datacenter instead | | String | *camel.component.consul.write-timeout-millis* | *Deprecated* Write timeout for OkHttpClient. Deprecation note: Use writeTimeout instead. The option is a java.lang.Long type. | | Long |=== // spring-boot-auto-configure options: END diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryAutoConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryAutoConfiguration.java index c154aa4..4a0fd9f 100644 --- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryAutoConfiguration.java +++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryAutoConfiguration.java @@ -29,7 +29,7 @@ import org.springframework.context.annotation.Scope; @Configuration(proxyBeanMethods = false) @AutoConfigureBefore(CamelAutoConfiguration.class) -@ConditionalOnProperty(prefix = "camel.component.consul.service-registry", name = "enabled") +@ConditionalOnProperty(prefix = "camel.cloud.consul.service-registry", name = "enabled") @EnableConfigurationProperties(ConsulServiceRegistryConfiguration.class) public class ConsulServiceRegistryAutoConfiguration { diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryConfiguration.java index b39103c..95230d1 100644 --- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryConfiguration.java +++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryConfiguration.java @@ -27,7 +27,7 @@ import com.orbitz.consul.option.ConsistencyMode; import org.apache.camel.support.jsse.SSLContextParameters; import org.springframework.boot.context.properties.ConfigurationProperties; -@ConfigurationProperties(prefix = "camel.component.consul.service-registry") +@ConfigurationProperties(prefix = "camel.cloud.consul.service-registry") public class ConsulServiceRegistryConfiguration extends org.apache.camel.component.consul.cloud.ConsulServiceRegistryConfiguration { /** * Sets if the consul service registry should be enabled or not, default is false. diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceAutoConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceAutoConfiguration.java index f0f18d0..6df8c6b 100644 --- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceAutoConfiguration.java +++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceAutoConfiguration.java @@ -32,7 +32,7 @@ import org.springframework.context.annotation.Scope; @Configuration(proxyBeanMethods = false) @AutoConfigureBefore({ ClusteredRouteControllerAutoConfiguration.class, CamelAutoConfiguration.class }) -@ConditionalOnProperty(prefix = "camel.component.consul.cluster.service", name = "enabled") +@ConditionalOnProperty(prefix = "camel.cluster.consul", name = "enabled") @EnableConfigurationProperties(ConsulClusterServiceConfiguration.class) public class ConsulClusterServiceAutoConfiguration { @Autowired diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceConfiguration.java index a5f90df..78d57e8 100644 --- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceConfiguration.java +++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceConfiguration.java @@ -28,7 +28,7 @@ import org.apache.camel.component.consul.cluster.ConsulClusterConfiguration; import org.apache.camel.support.jsse.SSLContextParameters; import org.springframework.boot.context.properties.ConfigurationProperties; -@ConfigurationProperties(prefix = "camel.component.consul.cluster.service") +@ConfigurationProperties(prefix = "camel.cluster.consul") public class ConsulClusterServiceConfiguration extends ConsulClusterConfiguration { /** * Sets if the consul cluster service should be enabled or not, default is false.
