gnodet-bot commented on code in PR #30074:
URL: https://github.com/apache/camel/pull/30074#discussion_r4579189211
##########
docs/user-manual/modules/ROOT/pages/oncompletion.adoc:
##########
@@ -35,12 +35,13 @@ headers, or send to a log to log the response message, etc.
=== onCompletion with route scope
The OnCompletion EIP allows you to add custom routes/processors when
-the original Exchange is complete. Camel spins off a
-copy of the Exchange and routes it in a separate
-thread, similar to a Wire Tap. This allows the
-original thread to continue while the onCompletion route is running
-concurrently. We chose this model as we did not want the
-onCompletion route to interfere with the original route.
+the original Exchange is complete. In the default `AfterConsumer` mode, Camel
spins off a
+copy of the Exchange, so the onCompletion route does not interfere with the
original route.
+
+By default, the onCompletion route runs synchronously, in the thread that
completes the original Exchange,
+after it is complete (or before the consumer writes the response, in
`BeforeConsumer` mode).
Review Comment:
🔤 **Nit (optional):** This sentence is 29 words with a heavy parenthetical.
Consider splitting:
> By default, the onCompletion route runs synchronously, in the thread that
completes the original Exchange, after it is complete. In `BeforeConsumer`
mode, it runs before the consumer writes the response.
The sentence wraps across two diff lines — apply the split manually.
##########
docs/user-manual/modules/ROOT/pages/producertemplate.adoc:
##########
@@ -119,15 +119,27 @@ Object result = FluentProducerTemplate.on(context)
You have sent an Exchange to Camel, but it fails during processing caused
by a thrown Exception. How do I retrieve this Exception?
-If you are using CamelTemplate (or CamelProducer), then it is common to
-use the sendBody/requestBody methods that returns the exchange body
-response *only*. So if there was a thrown exception during processing
-Camel is not rethrowing this Exception. To remedy this you can use the
-plain send/request methods that accepts an Exchange object and returns
-an Exchange object.
-
-From the returned Exchange you can test if it has failed and get the caused
-exception. This is illustrated in the code sample:
+The `sendBody` and `requestBody` methods (and their variants with headers)
return the body *only*.
+When processing fails, they throw a `CamelExecutionException`:
+
+* `getCause()` is the exception that failed the exchange. An EIP such as
Review Comment:
🔤 **Nit (optional):** Slightly unusual phrasing. Consider: "`getCause()`
returns the exception that caused the exchange failure."
##########
docs/user-manual/modules/ROOT/pages/bean-binding.adoc:
##########
@@ -231,6 +229,18 @@ xref:components:languages:simple-language.adoc[Simple]
tokens. Notice the tokens
* The value ends with `.class` then it's a type declaration instead - see the
next section about specifying types for overloaded methods.
+Any other value is also evaluated with the
xref:components:languages:simple-language.adoc[Simple] language,
+so a word without quotes is passed as that text: `echo(World)` passes the
String `World`.
+It is not a Java variable. To pass a value known when you build the route,
concatenate it into the method option,
+or use a property placeholder such as `echo({{greeting}})`.
+
+Do not put quotes around a Simple expression when the parameter is not a
String: `'${header.order}'` passes the
+header as text, and the call fails when that text cannot be converted to the
parameter type.
Review Comment:
🔤 **Nit (optional):** Long sentence (~35 words) with a mid-sentence code
example. Consider splitting after the colon:
> Do not put quotes around a Simple expression when the parameter is not a
String. For example, `'${header.order}'` passes the header as text, and the
call fails when that text cannot be converted to the parameter type.
The sentence wraps across two diff lines — apply the split manually.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]