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 4b0cd2eee3c5 CAMEL-16861: Update docs
4b0cd2eee3c5 is described below

commit 4b0cd2eee3c51da22be4b7625ed01458c57dec48
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Feb 24 09:49:09 2026 +0100

    CAMEL-16861: Update docs
---
 .../ROOT/pages/camel-4x-upgrade-guide-4_19.adoc    |   1 +
 .../modules/ROOT/pages/route-policy.adoc           | 185 +++++++++++++++------
 .../modules/ROOT/pages/route-reload.adoc           |  28 ++--
 3 files changed, 146 insertions(+), 68 deletions(-)

diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_19.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_19.adoc
index 0c94f4437598..b217ba3c8005 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_19.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_19.adoc
@@ -110,6 +110,7 @@ Google recommends migrating your Pub/Sub Lite workloads to 
either:
 
 * **Google Cloud Pub/Sub** → use the `camel-google-pubsub` component
 * **Google Cloud Managed Service for Apache Kafka** → use the `camel-kafka` 
component
+
 === camel-mail
 
 When configured a custom `IdempotentRepository` on `camel-mail` endpoint, then 
Camel will now auto-start
diff --git a/docs/user-manual/modules/ROOT/pages/route-policy.adoc 
b/docs/user-manual/modules/ROOT/pages/route-policy.adoc
index 984d7079cda0..3322ef7a43c1 100644
--- a/docs/user-manual/modules/ROOT/pages/route-policy.adoc
+++ b/docs/user-manual/modules/ROOT/pages/route-policy.adoc
@@ -9,8 +9,8 @@ kind of use cases.
 
 You associate a route with a given `RoutePolicy` and then during
 runtime Camel will invoke callbacks on this policy where you can
-implement your custom logic. Camel provides a support class that is a
-good base class to extend `org.apache.camel.support.RoutePolicySupport`.
+implement your custom logic. Camel provides a support class that can be used
+to extend `org.apache.camel.support.RoutePolicySupport` and implement your 
logic.
 
 There are these callbacks invoked:
 
@@ -40,12 +40,17 @@ fast.
 based policy modeled after the circuit breaker. This policy will stop consuming
 from an endpoint based on the type of exceptions that are thrown and the 
threshold setting.
 
+* `org.apache.camel.impl.cluster.ClusteredRoutePolicy` - is the foundation for 
`camel-cluster`
+which handles Camel routes to become active if a node becomes leader in a 
cluster.
+
 Camel also provides an ability to schedule routes to
 be activated, deactivated, suspended and/or resumed at certain times
 during the day using a
 xref:scheduledroutepolicy.adoc[ScheduledRoutePolicy] (offered via the
 xref:components::quartz-component.adoc[Quartz] component).
 
+And route policy is also used as an implementation details for some of the 
Camel observability components.
+
 == SuspendableService
 
 If you want to dynamic suspend/resume routes, then it is advised to
@@ -63,22 +68,11 @@ The throttling in flight route policy has the following 
options:
 
 [width="100%",cols="10%,10%,80%",options="header",]
 |===
-
 |Option |Default |Description
-
-|`scope` |`Route` |A scope for either `Route` or `Context` which defines if 
the current
-number of in flight exchanges is context based or for that particular
-route.
-
-|`maxInflightExchanges` |`1000` |The maximum threshold when the throttling 
will start to suspend the
-route if the current number of in flight exchanges is higher than this
-value.
-
-|`resumePercentOfMax` |`70` |A percentage `0..100` which defines when the 
throttling should resume
-again in case it has been suspended.
-
+|`scope` |`Route` |A scope for either `Route` or `Context` which defines if 
the current number of in flight exchanges is context based or for that 
particular route.
+|`maxInflightExchanges` |`1000` |The maximum threshold when the throttling 
will start to suspend the route if the current number of in flight exchanges is 
higher than this value.
+|`resumePercentOfMax` |`70` |A percentage `0..100` which defines when the 
throttling should resume again in case it has been suspended.
 |`loggingLevel` |`INFO` |The logging level used for logging the throttling 
activity.
-
 |`logger` |`ThrottlingInflightRoutePolicy` |The logger category.
 |===
 
@@ -101,84 +95,171 @@ messages per time unit.
 
 See xref:scheduledroutepolicy.adoc[Scheduled Route Policy] for scheduling 
based route policy.
 
-== Using route policies in Camel routes
+== Using RoutePolicy in Camel routes
+
+On the route(s) that should use one or more route policies, you configure this 
as shown below:
 
-You configure the route policy as follows from Java DSL, using the
-`routePolicy` method:
+[tabs]
+====
 
+Java::
++
+You configure the route policy as follows from Java DSL, using the 
`routePolicy` method:
++
 [source,java]
------------------------------------------------------------
+----
 RoutePolicy myPolicy = new MyRoutePolicy();
 
-from("seda:foo").routePolicy(myPolicy).to("mock:result");
------------------------------------------------------------
-
-In Spring XML you configure using the `routePolictRef` attribute on `<route>` 
as shown:
+from("seda:foo")
+    .routePolicy(myPolicy)
+    .to("mock:result");
+----
 
+XML::
++
+In XML you configure using the `routePolictRef` attribute on `<route>` as 
shown:
++
 [source,xml]
----------------------------------------------------------
+----
 <bean id="myPolicy" class="com.mycompany.MyRoutePolicy"/>
    
 <route routePolicyRef="myPolicy">
     <from uri="seda:foo"/>
     <to uri="mock:result"/>
 </route>
----------------------------------------------------------
+----
+
+YAML::
++
+In YAML you configure using the `routePolictRef` attribute on `route` node as 
shown:
++
+[source,yaml]
+----
+- route:
+    routePolicyRef: myPolicy
+    from:
+      uri: seda:foo
+      steps:
+        - to:
+            uri: mock:result
+----
+====
 
 You can configure one or more route policies (separated by comma), such as:
 
+[tabs]
+====
+
+Java::
++
 [source,java]
 ----
-from("seda:foo").routePolicy(myPolicy, myOtherPolicy).to("mock:result");
+from("seda:foo")
+    .routePolicy(myPolicy, myOtherPolicy)
+    .to("mock:result");
 ----
 
-And in XML:
-
+XML::
++
 [source,xml]
----------------------------------------------------------
+----
+<bean id="myPolicy" class="com.mycompany.MyRoutePolicy"/>
+
 <route routePolicyRef="myPolicy,myOtherPolicy">
     <from uri="seda:foo"/>
     <to uri="mock:result"/>
 </route>
----------------------------------------------------------
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    routePolicyRef: myPolicy,myOtherPolicy
+    from:
+      uri: seda:foo
+      steps:
+        - to:
+            uri: mock:result
+----
+====
+
 
 == Using RoutePolicyFactory
 
 If you want to use a route policy for every route, you can use
-a `org.apache.camel.spi.RoutePolicyFactory` as a factory for creating
-a `RoutePolicy` instance for each route. This can be used when you
-want to use the same kind of route policy for all or some routes.
+a `org.apache.camel.spi.RoutePolicyFactory` as a factory for creating new
+`RoutePolicy` instance(s) for each route. This can be used when you
+want to use the same kind of route policy for all.
 
 With the factory, you only need to configure this once, and every route 
created will
 have the policy assigned.
 
 There is API on `CamelContext` to add a factory, as shown below
 
+[tabs]
+====
+
+Java::
++
 [source,java]
-----------------------------------------------------------
+----
+CamelContext context = ...
 context.addRoutePolicyFactory(new MyRoutePolicyFactory());
-----------------------------------------------------------
-
-And from XML DSL you just define a `<bean>` with the factory, and Camel will 
automatically detect this factory:
+----
 
-[source,xml]
-----------------------------------------------------------------------
-<bean id="myRoutePolicyFactory" class="com.foo.MyRoutePolicyFactory"/>
-----------------------------------------------------------------------
+Spring Boot::
++
+You can also mark your class with Spring Boot `@Component` for automatic 
dependency injection
++
+[source,java]
+----
+@Component
+public class MyRoutePolicyFactory() {
 
-You can have as many route policy factories as you want, so if you have two 
factories,
-you can add them both as shown:
+}
+----
 
+Quarkus::
++
+You can also mark your class with Quarkus `@.ApplicationScoped` for automatic 
dependency injection
++
 [source,java]
-----------------------------------------------------------
-context.addRoutePolicyFactory(new MyRoutePolicyFactory());
-context.addRoutePolicyFactory(new MyOtherRoutePolicyFactory());
-----------------------------------------------------------
+----
+@ApplicationScoped
+public class MyRoutePolicyFactory() {
 
-And in XML:
+}
+----
 
+
+Spring XML::
++
+And from Spring XML DSL you just define a `<bean>` with the factory, and Camel 
will automatically detect this factory:
++
 [source,xml]
-----------------------------------------------------------------------
+----
 <bean id="myRoutePolicyFactory" class="com.foo.MyRoutePolicyFactory"/>
-<bean id="myOtherRoutePolicyFactory" 
class="com.foo.MyOtherRoutePolicyFactory"/>
-----------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<bean name="myRoutePolicyFactory" type="com.foo.MyRoutePolicyFactory"/>
+----
+
+YAML::
++
+[source,yaml]
+----
+- beans:
+    - name: myRoutePolicyFactory
+      type: com.foo.MyRoutePolicyFactory
+----
+====
+
+TIP: You can have as many route policy factories as you want, so if you have 
two factories,
+you can just add  both of them.
+
diff --git a/docs/user-manual/modules/ROOT/pages/route-reload.adoc 
b/docs/user-manual/modules/ROOT/pages/route-reload.adoc
index ea2ea97ae9ca..03f2c7e745dd 100644
--- a/docs/user-manual/modules/ROOT/pages/route-reload.adoc
+++ b/docs/user-manual/modules/ROOT/pages/route-reload.adoc
@@ -16,6 +16,11 @@ for file changes in the file system (i.e., using `file` and 
not `classpath`).
 
 The route reloading can be configured in Java or with Spring Boot, Quarkus in 
the following way:
 
+[tabs]
+====
+
+Java::
++
 [source,java]
 ----
 CamelContext context = ...
@@ -27,8 +32,10 @@ reload.setPattern("*.xml");
 context.addService(reload);
 ----
 
-And with Camel Quarkus / Camel Main you can configure this in 
`application.properties:`
-
+Application Properties::
++
+And with Spring Boot, Quarkus, Standalone you can configure this in 
`application.properties:`
++
 [source,properties]
 ----
 # turn on route reloading on file changes
@@ -38,18 +45,7 @@ camel.main.routes-reload-directory = myfolder/routes
 # pattern(s) for files to watch
 camel.main.routes-reload-pattern = *.xml
 ----
-
-And in Spring Boot:
-
-[source,properties]
-----
-# turn on route reloading on file changes
-camel.springboot.routes-reload-enabled = true
-# the base directory to watch
-camel.springboot.routes-reload-directory = myfolder/routes
-# pattern(s) for files to watch
-camel.springboot.routes-reload-pattern = *.xml
-----
+====
 
 === Route Reload Options
 
@@ -80,5 +76,5 @@ See related xref:context-reload.adoc[].
 
 See the following examples that come with live reloading enabled:
 
-- 
https://github.com/apache/camel-examples/tree/main/main-xml[camel-examples/examples/main-xml]
-- 
https://github.com/apache/camel-examples/tree/main/main-yaml[camel-examples/examples/main-yaml]
+- https://github.com/apache/camel-examples/tree/main/main-xml[Standalone XML 
DSL]
+- https://github.com/apache/camel-examples/tree/main/main-yaml[Standalone YAML 
DSL]

Reply via email to