This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 9417fa8 Polish and cleanup documentation 9417fa8 is described below commit 9417fa8231c8f9cd522291e88dad27a70260b158 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Aug 9 14:07:48 2021 +0200 Polish and cleanup documentation --- .../user-manual/modules/ROOT/pages/clustering.adoc | 30 ++++++--------- .../modules/ROOT/pages/component-dsl.adoc | 1 + docs/user-manual/modules/ROOT/pages/component.adoc | 2 +- .../modules/ROOT/pages/componentconfiguration.adoc | 44 ---------------------- docs/user-manual/modules/ROOT/pages/index.adoc | 1 - 5 files changed, 14 insertions(+), 64 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/clustering.adoc b/docs/user-manual/modules/ROOT/pages/clustering.adoc index 8627e42..dfebc96 100644 --- a/docs/user-manual/modules/ROOT/pages/clustering.adoc +++ b/docs/user-manual/modules/ROOT/pages/clustering.adoc @@ -1,14 +1,7 @@ [[Clustering-Clustering]] = Clustering -*Since Camel 2.20* - -[WARNING] -==== -*Experimental feature* -==== - -In Camel 2.20 we have introduced the following cluster related SPI: +Camel offers the following cluster related SPI: - *Cluster Service* + @@ -21,21 +14,19 @@ Represent a view of the cluster with its own set of isolated resources. As today * Leader Election * Topology events like members joining/leaving the cluster) - - *Cluster Member* + Represent a member of the cluster. -== Cluster SPI Set-Up +== Cluster SPI Setup -A _Cluster Service_ is just like any other camel service so set it up you only need to register your implementations to the camel context: +A _Cluster Service_ is just like any other camel service so set it up you only need to register your implementations +to the `CamelContext`: [source,java] ---- - MyClusterServiceImpl service = new MyClusterServiceImpl(); - context.addService(service); ---- @@ -48,6 +39,9 @@ Out of the box camel provides the following implementations: |atomix |camel-atomix | org.apache.camel.component.atomix.cluster.AtomixClusterService |consul |camel-consul | org.apache.camel.component.consul.cluster.ConsulClusterService |file |camel-core | org.apache.camel.component.file.cluster.FileLockClusterService +|infinispan |camel-infinispan | org.apache.camel.component.infinispan.cluster.InfinispanClusterService +|jgroups |camel-jgroups | org.apache.camel.component.jgroups.cluster.JGroupsLockClusterService +|jgroups-raft |camel-jgroups-raft | org.apache.camel.component.jgroups.raft.cluster.JGroupsRaftClusterService |kubernetes |camel-kubernetes | org.apache.camel.component.kubernetes.cluster.KubernetesClusterService |zookeeper |camel-zookeeper | org.apache.camel.component.zookeeper.cluster.ZooKeeperClusterService |==== @@ -60,9 +54,9 @@ Configuration examples: + [source,properties] ---- -camel.component.file.cluster.service.enabled = true -camel.component.file.cluster.service.id = ${random.uuid} -camel.component.file.cluster.service.root = ${java.io.tmpdir} +camel.cluster.file.enabled = true +camel.cluster.file.id = ${random.uuid} +camel.cluster.file.root = ${java.io.tmpdir} ---- @@ -156,7 +150,7 @@ public RouteBuilder routeBuilder() { } ---- + -You can then leverage spring-boot configuration to make them clustered: +You can then leverage Spring Boot configuration to make them clustered: + [source,properties] ---- @@ -166,7 +160,7 @@ camel.clustered.controller.enabled = true # define the default namespace for routes camel.clustered.controller.namespace = my-ns -# exlude the route with id 'heartbeat' from the clustered ones +# exclude the route with id 'heartbeat' from the clustered ones camel.clustered.controller.routes[heartbeat].clustered = false ---- diff --git a/docs/user-manual/modules/ROOT/pages/component-dsl.adoc b/docs/user-manual/modules/ROOT/pages/component-dsl.adoc index cbec439..fd6923b 100644 --- a/docs/user-manual/modules/ROOT/pages/component-dsl.adoc +++ b/docs/user-manual/modules/ROOT/pages/component-dsl.adoc @@ -29,6 +29,7 @@ In order to explain it better, we can break down the above Java statement into 3 . `.register(camelContext, "kafka")`: Here we register directly the component under name `kafka` into Camel context, of course you can use any component name you like, just like `addComponent` API. == The fluent DSL now provides type safety for parameters + Similar to the Endpoint DSL, uses the meta model, which is extracted from the source using an annotation processor and written in various JSON files, to generate a fluent DSL for each component. This fluent DSL provides type safety for parameters. It further allows leveraging the Java editor code completion to access the list of available parameters for the each component. diff --git a/docs/user-manual/modules/ROOT/pages/component.adoc b/docs/user-manual/modules/ROOT/pages/component.adoc index 2c04891..71ae41a 100644 --- a/docs/user-manual/modules/ROOT/pages/component.adoc +++ b/docs/user-manual/modules/ROOT/pages/component.adoc @@ -13,7 +13,7 @@ xref:uris.adoc[URIs]. Camel includes the following Component implementations via xref:uris.adoc[URIs]. -[IMPORTANT] +[NOTE] ==== Make sure to read xref:faq:how-do-i-configure-endpoints.adoc[How do I configure endpoints?] to learn more about configuring endpoints. For diff --git a/docs/user-manual/modules/ROOT/pages/componentconfiguration.adoc b/docs/user-manual/modules/ROOT/pages/componentconfiguration.adoc deleted file mode 100644 index 3962f0d..0000000 --- a/docs/user-manual/modules/ROOT/pages/componentconfiguration.adoc +++ /dev/null @@ -1,44 +0,0 @@ -[[ComponentConfiguration-ComponentConfigurationAPI]] -= ComponentConfiguration API - -As of *Camel 2.12* the new ComponentConfiguration API provides a -mechanism for tools (command line, IDE, web based) to introspect the -available Camel components and introspect what configuration parameters -are available on the components to create new endpoints, edit existing -endpoints or create/edit URIs for endpoints (if the aim is to allow UI -editting of Camel routes for example). - -To get an idea for the kinds of things you can do with the -ComponentConfiguration API -https://github.com/apache/camel/blob/main/camel-core/src/test/java/org/apache/camel/impl/ComponentConfigurationTest.java#L72[check -out the test case]. - -For example given a Component object you can create a new configuration; -then introspect the available properties... - -[source,java] ------------------------------------------------------------------------------------------------------- -Component component = camelContext.getComponent("seda"); -ComponentConfiguration configuration = component.createComponentConfiguration(); - -// now lets introspect the available parameters... -SortedMap<String, ParameterConfiguration> parameterMap = configuration.getParameterConfigurationMap(); - -// or lets look up a named parameter -ParameterConfiguration config = configuration.getParameterConfiguration("foo"); - - -// lets get or set the parameter values... -configuration.setParameter("concurrentConsumers", 5); -configuration.setParameter("size", 1000); - -// or lets set the base URI and parameters from a URI string -configuration.setUriString("foo?concurrentConsumers=5&size=1000"); - - -// now lets convert the configuration to a URI string -String uriString = configuration.getUriString(); - -// now lets convert the configuration to an Endpoint -Endpoint newEndpoint = configuration.createEndpoint(); ------------------------------------------------------------------------------------------------------- diff --git a/docs/user-manual/modules/ROOT/pages/index.adoc b/docs/user-manual/modules/ROOT/pages/index.adoc index ea5971f..e486698 100644 --- a/docs/user-manual/modules/ROOT/pages/index.adoc +++ b/docs/user-manual/modules/ROOT/pages/index.adoc @@ -82,7 +82,6 @@ camel routes without them knowing * xref:camelcontext.adoc[CamelContext] * xref:clustering.adoc[Clustering and loadbalancing] * xref:components::index.adoc[Component] -* xref:componentconfiguration.adoc[ComponentConfiguration] * xref:data-format.adoc[Data Format] * xref:debugger.adoc[Debugger] * xref:delay-interceptor.adoc[Delay Interceptor]