This is an automated email from the ASF dual-hosted git repository. fmariani pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 9b4d02995930e37a362b0e4aa586c355c17e1de0 Author: Ganesh Patil <[email protected]> AuthorDate: Wed Jan 14 14:27:51 2026 +0530 Add documentation for cluster service infra starters This commit fixes the spring boot starter documentation issue #978. The cluster service starters (consul, file, infinispan, jgroups-raft, kubernetes, zookeeper) are infrastructure starters that do not directly map to a Camel component, causing unused JSON file warnings in the documentation build. Changes: - Added dedicated documentation pages for each cluster service starter - Added Cluster Services section to list.adoc - Modified indexcount to exclude cluster service JSON files from the mismatch count check - Updated nav.adoc with cluster service navigation entries --- docs/spring-boot/modules/ROOT/nav.adoc | 11 ++- .../modules/ROOT/pages/consul-cluster-service.adoc | 97 ++++++++++++++++++++++ .../modules/ROOT/pages/file-cluster-service.adoc | 62 ++++++++++++++ .../ROOT/pages/infinispan-cluster-service.adoc | 52 ++++++++++++ .../ROOT/pages/jgroups-raft-cluster-service.adoc | 56 +++++++++++++ .../ROOT/pages/kubernetes-cluster-service.adoc | 79 ++++++++++++++++++ docs/spring-boot/modules/ROOT/pages/list.adoc | 41 ++++++++- .../ROOT/pages/zookeeper-cluster-service.adoc | 81 ++++++++++++++++++ 8 files changed, 474 insertions(+), 5 deletions(-) diff --git a/docs/spring-boot/modules/ROOT/nav.adoc b/docs/spring-boot/modules/ROOT/nav.adoc index 663af4540e7..377dc223b80 100644 --- a/docs/spring-boot/modules/ROOT/nav.adoc +++ b/docs/spring-boot/modules/ROOT/nav.adoc @@ -2,6 +2,11 @@ * xref:spring-boot.adoc[Camel Context starter] * xref:list.adoc[List of starters] * xref:starter-configuration.adoc[Starter Configuration] -* xref:contributing.adoc[Contributing] -//* xref:_list-old.adoc[old List of starters] - +* Cluster Services +** xref:consul-cluster-service.adoc[Consul] +** xref:file-cluster-service.adoc[File] +** xref:infinispan-cluster-service.adoc[Infinispan] +** xref:jgroups-raft-cluster-service.adoc[JGroups Raft] +** xref:kubernetes-cluster-service.adoc[Kubernetes] +** xref:zookeeper-cluster-service.adoc[Zookeeper] +* xref:contributing.adoc[Contributing] \ No newline at end of file diff --git a/docs/spring-boot/modules/ROOT/pages/consul-cluster-service.adoc b/docs/spring-boot/modules/ROOT/pages/consul-cluster-service.adoc new file mode 100644 index 00000000000..bbd5b725d8c --- /dev/null +++ b/docs/spring-boot/modules/ROOT/pages/consul-cluster-service.adoc @@ -0,0 +1,97 @@ += Consul Cluster Service + +The Consul Cluster Service starter provides a cluster service implementation using https://www.consul.io/[HashiCorp Consul] for distributed coordination and leader election in Camel Spring Boot applications. + +== Maven Dependency + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.springboot</groupId> + <artifactId>camel-consul-cluster-service-starter</artifactId> +</dependency> +---- + +== Configuration Options + +The following configuration options are available under the `camel.cluster.consul` prefix: + +[cols="3,2,5",options="header"] +|=== +| Option | Default | Description + +| enabled +| true +| Sets if the consul cluster service should be enabled or not. + +| id +| +| Cluster Service ID. + +| url +| +| The Consul agent URL. + +| acl-token +| +| Sets the ACL token to be used with Consul. + +| user-name +| +| Sets the username to be used for basic authentication. + +| password +| +| Sets the password to be used for basic authentication. + +| datacenter +| +| The data center. + +| root-path +| /camel +| Consul root path. + +| session-ttl +| 60 +| The value of TTL (in seconds). + +| session-lock-delay +| 5 +| The value for lockDelay (in seconds). + +| session-refresh-interval +| 5 +| The value of wait attribute (in seconds). + +| block-seconds +| 10 +| The time (in seconds) to wait for a watch event. + +| order +| +| Service lookup order/priority. + +| attributes +| +| Custom service attributes. +|=== + +== Usage Example + +[source,java] +---- +@Configuration +public class ClusterConfig { + // The cluster service is auto-configured when the starter is on the classpath + // and camel.cluster.consul.enabled=true (default) +} +---- + +Configure in `application.properties`: + +[source,properties] +---- +camel.cluster.consul.url=http://localhost:8500 +camel.cluster.consul.root-path=/camel/cluster +---- diff --git a/docs/spring-boot/modules/ROOT/pages/file-cluster-service.adoc b/docs/spring-boot/modules/ROOT/pages/file-cluster-service.adoc new file mode 100644 index 00000000000..c2b6bcd04a0 --- /dev/null +++ b/docs/spring-boot/modules/ROOT/pages/file-cluster-service.adoc @@ -0,0 +1,62 @@ += File Cluster Service + +The File Cluster Service starter provides a cluster service implementation using file-based locking for simple clustering scenarios in Camel Spring Boot applications. + +This is suitable for single-machine clustering or shared filesystem scenarios. + +== Maven Dependency + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.springboot</groupId> + <artifactId>camel-file-cluster-service-starter</artifactId> +</dependency> +---- + +== Configuration Options + +The following configuration options are available under the `camel.cluster.file` prefix: + +[cols="3,2,5",options="header"] +|=== +| Option | Default | Description + +| enabled +| true +| Sets if the file cluster service should be enabled or not. + +| id +| +| Cluster Service ID. + +| root +| +| The root path for file-based cluster coordination. + +| acquire-lock-delay +| 1000 +| The time to wait before acquiring a lock (in milliseconds). + +| acquire-lock-interval +| 10000 +| The interval for trying to acquire a lock (in milliseconds). + +| order +| +| Service lookup order/priority. + +| attributes +| +| Custom service attributes. +|=== + +== Usage Example + +Configure in `application.properties`: + +[source,properties] +---- +camel.cluster.file.enabled=true +camel.cluster.file.root=/var/camel/cluster +---- diff --git a/docs/spring-boot/modules/ROOT/pages/infinispan-cluster-service.adoc b/docs/spring-boot/modules/ROOT/pages/infinispan-cluster-service.adoc new file mode 100644 index 00000000000..89b6877b254 --- /dev/null +++ b/docs/spring-boot/modules/ROOT/pages/infinispan-cluster-service.adoc @@ -0,0 +1,52 @@ += Infinispan Cluster Service + +The Infinispan Cluster Service starter provides a cluster service implementation using https://infinispan.org/[Infinispan] distributed cache for clustering in Camel Spring Boot applications. + +== Maven Dependency + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.springboot</groupId> + <artifactId>camel-infinispan-cluster-service-starter</artifactId> +</dependency> +---- + +== Configuration Options + +The following configuration options are available under the `camel.cluster.infinispan` prefix: + +[cols="3,2,5",options="header"] +|=== +| Option | Default | Description + +| enabled +| true +| Sets if the infinispan cluster service should be enabled or not. + +| id +| +| Cluster Service ID. + +| hosts +| +| Specifies the Infinispan server hosts. + +| order +| +| Service lookup order/priority. + +| attributes +| +| Custom service attributes. +|=== + +== Usage Example + +Configure in `application.properties`: + +[source,properties] +---- +camel.cluster.infinispan.enabled=true +camel.cluster.infinispan.hosts=localhost:11222 +---- diff --git a/docs/spring-boot/modules/ROOT/pages/jgroups-raft-cluster-service.adoc b/docs/spring-boot/modules/ROOT/pages/jgroups-raft-cluster-service.adoc new file mode 100644 index 00000000000..d18b4e12c5d --- /dev/null +++ b/docs/spring-boot/modules/ROOT/pages/jgroups-raft-cluster-service.adoc @@ -0,0 +1,56 @@ += JGroups Raft Cluster Service + +The JGroups Raft Cluster Service starter provides a cluster service implementation using http://www.jgroups.org/[JGroups] with the Raft consensus protocol for clustering in Camel Spring Boot applications. + +== Maven Dependency + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.springboot</groupId> + <artifactId>camel-jgroups-raft-cluster-service-starter</artifactId> +</dependency> +---- + +== Configuration Options + +The following configuration options are available under the `camel.cluster.jgroups.raft` prefix: + +[cols="3,2,5",options="header"] +|=== +| Option | Default | Description + +| enabled +| true +| Sets if the jgroups raft cluster service should be enabled or not. + +| id +| +| Cluster Service ID. + +| raft-id +| +| The JGroups Raft ID for this node. + +| raft-config +| +| The JGroups Raft configuration file. + +| order +| +| Service lookup order/priority. + +| attributes +| +| Custom service attributes. +|=== + +== Usage Example + +Configure in `application.properties`: + +[source,properties] +---- +camel.cluster.jgroups.raft.enabled=true +camel.cluster.jgroups.raft.raft-id=node1 +---- diff --git a/docs/spring-boot/modules/ROOT/pages/kubernetes-cluster-service.adoc b/docs/spring-boot/modules/ROOT/pages/kubernetes-cluster-service.adoc new file mode 100644 index 00000000000..6789bc3db89 --- /dev/null +++ b/docs/spring-boot/modules/ROOT/pages/kubernetes-cluster-service.adoc @@ -0,0 +1,79 @@ += Kubernetes Cluster Service + +The Kubernetes Cluster Service starter provides a cluster service implementation using Kubernetes native mechanisms for clustering in Camel Spring Boot applications. + +This implementation uses Kubernetes ConfigMaps or Leases for leader election. + +== Maven Dependency + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.springboot</groupId> + <artifactId>camel-kubernetes-cluster-service-starter</artifactId> +</dependency> +---- + +== Configuration Options + +The following configuration options are available under the `camel.cluster.kubernetes` prefix: + +[cols="3,2,5",options="header"] +|=== +| Option | Default | Description + +| enabled +| true +| Sets if the kubernetes cluster service should be enabled or not. + +| id +| +| Cluster Service ID. + +| kubernetes-namespace +| +| The Kubernetes namespace for cluster coordination resources. + +| config-map-name +| +| The name of the ConfigMap used for leader election. + +| pod-name +| +| The name of the current pod. + +| cluster-labels +| +| Labels used to identify cluster members. + +| lease-duration-millis +| 15000 +| The lease duration in milliseconds. + +| renew-deadline-millis +| 10000 +| The renew deadline in milliseconds. + +| retry-period-millis +| 2000 +| The retry period in milliseconds. + +| order +| +| Service lookup order/priority. + +| attributes +| +| Custom service attributes. +|=== + +== Usage Example + +Configure in `application.properties`: + +[source,properties] +---- +camel.cluster.kubernetes.enabled=true +camel.cluster.kubernetes.kubernetes-namespace=camel-cluster +camel.cluster.kubernetes.config-map-name=camel-leader +---- diff --git a/docs/spring-boot/modules/ROOT/pages/list.adoc b/docs/spring-boot/modules/ROOT/pages/list.adoc index f47884bec70..99433e4b3ad 100644 --- a/docs/spring-boot/modules/ROOT/pages/list.adoc +++ b/docs/spring-boot/modules/ROOT/pages/list.adoc @@ -5,7 +5,8 @@ :base-deprecated-query: {base-query},attributes='camel-spring-boot-name,deprecated' :base-missing-query: {base-query},attributes=!camel-spring-boot-name -include::indexcount$[component=components,module=spring-boot,family=example,queries='existing='] +// Count all starter JSON files excluding cluster service starters +include::indexcount$[component=components,module=spring-boot,family=example,exclude='*-cluster-service.json',queries='existing='] include::indexuniquecount$[component=components,module=*,attributes=camel-spring-boot-name,formats='used=camelSpringBootName'] ifeval::[{used} != {existing}] @@ -29,9 +30,11 @@ There are {existing} spring boot starter json files. Of these {used} are used in components, dataformats, etc. +NOTE: Cluster service starters (consul, file, infinispan, jgroups-raft, kubernetes, zookeeper) are documented in the <<Cluster Services>> section below. + === Unused spring-boot-starter names -[indexBlock, 'resourceid=$resourceid,sbname=util.extractSBName($resourceid)',component=components,module=spring-boot,family=example,requires={requires}] +[indexBlock, 'resourceid=$resourceid,sbname=util.extractSBName($resourceid)',component=components,module=spring-boot,family=example,exclude='*-cluster-service.json',requires={requires}] ---- %include::indexcount$[component=components,module=*,attributes='camel-spring-boot-name={sbname}',queries='using='] @@ -133,3 +136,37 @@ ifdef::sb-statistics[] |=== indexTable::[{cellformats},{requires},module=others,{base-missing-query}] endif::[] + +== Cluster Services + +The following cluster service starters provide high-availability clustering support for Camel applications. +These are infrastructure starters that do not directly map to a Camel component but provide clustering capabilities. + +[width="100%",cols="4,3,6",options="header"] +|=== +| Cluster Service | Artifact | Description + +| xref:consul-cluster-service.adoc[Consul Cluster Service] +| camel-consul-cluster-service-starter +| Cluster service implementation using HashiCorp Consul for distributed coordination and leader election. + +| xref:file-cluster-service.adoc[File Cluster Service] +| camel-file-cluster-service-starter +| Cluster service implementation using file-based locking for simple clustering scenarios. + +| xref:infinispan-cluster-service.adoc[Infinispan Cluster Service] +| camel-infinispan-cluster-service-starter +| Cluster service implementation using Infinispan distributed cache for clustering. + +| xref:jgroups-raft-cluster-service.adoc[JGroups Raft Cluster Service] +| camel-jgroups-raft-cluster-service-starter +| Cluster service implementation using JGroups with Raft consensus protocol. + +| xref:kubernetes-cluster-service.adoc[Kubernetes Cluster Service] +| camel-kubernetes-cluster-service-starter +| Cluster service implementation using Kubernetes native mechanisms for clustering. + +| xref:zookeeper-cluster-service.adoc[Zookeeper Cluster Service] +| camel-zookeeper-cluster-service-starter +| Cluster service implementation using Apache Zookeeper for distributed coordination. +|=== \ No newline at end of file diff --git a/docs/spring-boot/modules/ROOT/pages/zookeeper-cluster-service.adoc b/docs/spring-boot/modules/ROOT/pages/zookeeper-cluster-service.adoc new file mode 100644 index 00000000000..26b6821c5fe --- /dev/null +++ b/docs/spring-boot/modules/ROOT/pages/zookeeper-cluster-service.adoc @@ -0,0 +1,81 @@ += Zookeeper Cluster Service + +The Zookeeper Cluster Service starter provides a cluster service implementation using https://zookeeper.apache.org/[Apache Zookeeper] for distributed coordination in Camel Spring Boot applications. + +== Maven Dependency + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.springboot</groupId> + <artifactId>camel-zookeeper-cluster-service-starter</artifactId> +</dependency> +---- + +== Configuration Options + +The following configuration options are available under the `camel.cluster.zookeeper` prefix: + +[cols="3,2,5",options="header"] +|=== +| Option | Default | Description + +| enabled +| true +| Sets if the zookeeper cluster service should be enabled or not. + +| id +| +| Cluster Service ID. + +| nodes +| +| The Zookeeper server nodes (comma-separated list of host:port). + +| namespace +| +| The Zookeeper namespace. + +| base-path +| /camel/cluster +| The base path for cluster coordination. + +| reconnect-base-sleep-time +| 1000 +| Initial amount of time to wait between retries (in milliseconds). + +| reconnect-max-sleep-time +| +| Max time to sleep on each retry (in milliseconds). + +| reconnect-max-retries +| 3 +| Max number of times to retry. + +| session-timeout +| 60000 +| Session timeout (in milliseconds). + +| connection-timeout +| 15000 +| Connection timeout (in milliseconds). + +| order +| +| Service lookup order/priority. + +| attributes +| +| Custom service attributes. +|=== + +== Usage Example + +Configure in `application.properties`: + +[source,properties] +---- +camel.cluster.zookeeper.enabled=true +camel.cluster.zookeeper.nodes=localhost:2181 +camel.cluster.zookeeper.base-path=/camel/cluster +----
