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

commit 5a11e96cfb9cfe394054b717fa41188a47b1d48f
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Feb 16 13:35:07 2026 +0100

    CAMEL-16861: Update docs
---
 .../docs/modules/eips/pages/resilience4j-eip.adoc  | 91 ++++++++++++++++++++++
 .../docs/modules/eips/pages/return-address.adoc    | 25 ++++++
 .../main/docs/modules/eips/pages/rollback-eip.adoc | 44 +++++++++++
 .../eips/pages/roundRobinLoadBalancer-eip.adoc     | 29 ++++++-
 .../docs/modules/eips/pages/routingSlip-eip.adoc   | 39 ++++++++--
 5 files changed, 220 insertions(+), 8 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/resilience4j-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/resilience4j-eip.adoc
index a0649a861479..0186e386d71a 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/resilience4j-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/resilience4j-eip.adoc
@@ -55,6 +55,28 @@ XML::
     <to uri="mock:result"/>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - circuitBreaker:
+            steps:
+              - to:
+                  uri: http://fooservice.com/faulty
+              - onFallback:
+                  steps:
+                    - transform:
+                        expression:
+                          constant:
+                            expression: Fallback message
+        - to:
+            uri: mock:result
+----
 ====
 
 In case the calling the downstream HTTP service is failing, and an exception 
is thrown,
@@ -102,6 +124,29 @@ XML::
   <log message="After Resilience: ${body}"/>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - circuitBreaker:
+            steps:
+              - resilience4jConfiguration:
+                  timeoutDuration: 2000
+                  timeoutEnabled: "true"
+              - log:
+                  message: "Resilience processing start: ${threadName}"
+              - to:
+                  uri: http://fooservice.com/faulty
+              - log:
+                  message: "Resilience processing end: ${threadName}"
+        - log:
+            message: "After Resilience ${body}"
+----
 ====
 
 In this example if calling the downstream service does not return a response 
within 2 seconds,
@@ -116,6 +161,10 @@ is not reacting also.
 However, you can enable Camels error handler with circuit breaker by enabling
 the `inheritErrorHandler` option, as shown:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 // Camel's error handler that will attempt to redeliver the message 3 times
@@ -132,6 +181,48 @@ from("direct:start")
     .to("mock:result");
 ----
 
+
+XML::
++
+[source,xml]
+----
+<route>
+    <from uri="direct:start"/>
+    <to uri="log:start"/>
+    <circuitBreaker inheritErrorHandler="true">
+        <to uri="mock:a"/>
+        <throwException exceptionType="java.lang.IllegalArgumentException" 
message="Forced"/>
+    </circuitBreaker>
+    <to uri="log:result"/>
+    <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - to:
+            uri: log:start
+        - circuitBreaker:
+            inheritErrorHandler: "true"
+            steps:
+              - to:
+                  uri: mock:a
+              - throwException:
+                  exceptionType: "java.lang.IllegalArgumentException"
+                  message: "Forced"
+        - to:
+            uri: log:result
+        - to:
+            uri: mock:result
+----
+====
+
 This example is from a test, where you can see the Circuit Breaker EIP block 
has been hardcoded
 to always fail by throwing an exception. Because the `inheritErrorHandler` has 
been enabled,
 then Camel's error handler will attempt to call the Circuit Breaker EIP block 
again.
diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/return-address.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/return-address.adoc
index c65e4786d75f..0382791bd199 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/return-address.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/return-address.adoc
@@ -40,6 +40,19 @@ XML::
     <to pattern="InOut" uri="jms:queue:cheese"/>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:foo
+      steps:
+        - to:
+            uri: jms:queue:cheese
+            pattern: InOut
+----
 ====
 
 You can also specify a named reply queue with the `replyTo` option (instead of 
a temporary queue).
@@ -64,6 +77,18 @@ XML::
     <to uri="jms:queue:cheese?replyTo=myReplyQueue"/>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:foo
+      steps:
+        - to:
+            uri: jms:queue:cheese?replyTo=myReplyQueue
+----
 ====
 
 == See Also
diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc
index e0c4899c3d5e..4aa12f3e6e2a 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc
@@ -56,6 +56,28 @@ XML::
     </choice>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  simple:
+                    expression: "${body} contains 'error'"
+                steps:
+                  - rollback:
+                      message: That do not work
+            otherwise:
+              steps:
+                - to:
+                    uri: direct:continue
+----
 ====
 
 When Camel is rolling back, then a `RollbackExchangeException` is thrown with 
the cause message `_"That do not work"_`.
@@ -97,6 +119,28 @@ XML::
     </choice>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  simple:
+                    expression: "${body} contains 'error'"
+                steps:
+                  - rollback:
+                      markRollbackOnly: "true"
+            otherwise:
+              steps:
+                - to:
+                    uri: direct:continue
+----
 ====
 
 Then no exception is thrown, but the message is marked to rollback and stopped 
routing.
diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/roundRobinLoadBalancer-eip.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/roundRobinLoadBalancer-eip.adoc
index 1529d2fe3476..e5eb44749e2b 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/roundRobinLoadBalancer-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/roundRobinLoadBalancer-eip.adoc
@@ -27,8 +27,11 @@ include::partial$eip-exchangeProperties.adoc[]
 
 We want to load balance between three endpoints in round-robin mode.
 
-This is done as follows in Java DSL:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -39,8 +42,8 @@ from("direct:start")
     .end();
 ----
 
-In XML, you'll have a route like this:
-
+XML::
++
 [source,xml]
 ----
 <route>
@@ -53,3 +56,23 @@ In XML, you'll have a route like this:
     </loadBalance>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - loadBalance:
+            steps:
+              - roundRobinLoadBalancer: {}
+              - to:
+                  uri: seda:x
+              - to:
+                  uri: seda:y
+              - to:
+                  uri: seda:z
+----
+====
\ No newline at end of file
diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/routingSlip-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/routingSlip-eip.adoc
index 7425623736ac..22602c89f9fa 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/routingSlip-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/routingSlip-eip.adoc
@@ -62,6 +62,20 @@ XML::
   </routingSlip>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: activemq:cheese
+      steps:
+        - routingSlip:
+            expression:
+              header:
+                expression: whereTo
+----
 ====
 
 The value of the header ("whereTo") should be a comma-delimited string of 
endpoint URIs you wish the message to be routed to.
@@ -96,22 +110,37 @@ You can use it to skip endpoints which are invalid.
 Java::
 +
 [source,java]
----------------------
+----
 from("direct:start")
-  .routingSlip("myHeader").ignoreInvalidEndpoints();
----------------------
+  .routingSlip(header("myHeader")).ignoreInvalidEndpoints();
+----
 
 XML::
 +
 [source,xml]
----------------------
+----
 <route>
   <from uri="direct:start"/>
   <routingSlip ignoreInvalidEndpoints="true">
     <header>myHeader</header>
   </routingSlip>
 </route>
----------------------
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - routingSlip:
+            ignoreInvalidEndpoints: "true"
+            expression:
+              header:
+                expression: myHeader
+----
 ====
 
 Then let us say the `myHeader` contains the following two endpoints 
`direct:foo,xxx:bar`.

Reply via email to